Sympa::Message::Plugin(3Sympa)
β¨ Sympa::Message::Plugin(3Sympa) β¨
okay bestie, welcome to Sympa::Message::Plugin(3Sympa) β the hook system for Sympa, straight outta the sympa 6.2.80 era π
πΈ NAME πΈ
Sympa::Message::Plugin β it processes hooks, periodt.
π¦ SYNOPSIS π¦
Sympa::Message::Plugin::execute('post_archive', $message);
π DESCRIPTION π
So Sympa::Message::Plugin is the whole hook mechanism β it lets you cut in on Sympa while it's processing stuff. Every hook has main character energy and can either modify objects (messages and so on, bestie) or straight up break the ordinary processing flow. Iconic, honestly.
Notice: the hook mechanism is experimental π§ͺ. Module names and interfaces may change in the future β so like, don't build your whole personality on them, okay?
π Methods
execute ( HOOK_NAME, MESSAGE, [ KEY => VAL, ... ] )β processes a message hook. That's it, that's the vibe.
π Hooks
Currently, these hooks are the supported ones β this is the full list, no gatekeeping:
pre_distributeβ a Message hook. The message has already been approved for distribution (either by scenario or by a moderator), BUT it hasn't been decorated yet (you know, adding a custom subject and stuff like that) and it hasn't been archived either. It's in its in-between era β¨post_archiveβ a Message hook. The message has been archived already, BUT it hasn't been distributed to users yet β that includes the digest spool β and it also hasn't been signed or encrypted (if that was even necessary). So close, yet so far π
π«Ά How to add a hook to your Sympa
First step, bestie: write your hook module. Copy this exactly, no improvising:
package My::Hook;
use constant gettext_id => 'My message hook';
sub post_archive {
my $module = shift; # module name: "My::Hook"
my $name = shift; # handler name: "post_archive"
my $message = shift; # Message object
my %options = @_;
# Processing, possibly changing $message...
# Return suitable result.
# If unrecoverable error occurred, you may return undef or simply die.
return 1;
}
1;
Then you gotta activate that hook handler in your list config, like so:
message_hook
post_archive My::Hook
And that's literally it. Slay π
π SEE ALSO π
Sympa::Message::Plugin::FixEncodingβ an example module for a message hook. Go look at it, it's the blueprint fr fr.
π HISTORY π
Sympa::Message::Plugin appeared on Sympa 6.2. It was initially written by IKEDA Soji <ikeda@conversion.co.jp>. Give them their flowers πΈ
and that's a wrap on the Sympa::Message::Plugin(3Sympa) page from sympa 6.2.80, dated 2026-10-19 πβ¨ go forth and hook responsibly, bestie π«Άπ
π¦ where this page comes from
- fedora 43: sympa-devel-doc 6.2.80-2.fc43 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- fedora 44: sympa-devel-doc 6.2.80-2.fc44 Β· GPL-2.0-or-later AND (OFL-1.1-RFN AND MIT) AND OFL-1.1-RFN AND MIT and (MIT OR GPL-2.0-only)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms