Mail::...erRegex(3pm)

πŸ“¦
version 0.07 Β· 2 versions
, in debian bookworm, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Mail::Milter::Module::HeaderRegex β€” a milter bestie that accepts or rejects messages based on what's lurking in their headers πŸ’–

(yeah the page header says Mail::...erRegex(3pm) and the man section is 3pm, but the whole name is Mail::Milter::Module::HeaderRegex, no cap)


🌸 SYNOPSIS 🌸

use Mail::Milter::Module::HeaderRegex;

my $milter = new Mail::Milter::Module::HeaderRegex('^Foo: ');

my $milter2 = &HeaderRegex('^Foo: Bar'); # convenience

okay so like, two whole ways to summon it and both are giving main character energy ✨


πŸ’… DESCRIPTION πŸ’…

So this milter module is the bouncer at the door πŸšͺ β€” it rejects messages at the DATA phase if even one of the message's headers matches the regular expressions you hand it. One little match and it's over, sweetie, no second chances. Periodt.


πŸŽ€ METHODS πŸŽ€

  • new(REGEX[, ...])

She takes one or more regular expressions β€” as strings or as qr// precompiled regexes, your call bestie 🫢. They get tested in sequence, and the first match terminates checking. So the order lowkey matters, iykyk.

  • set_message(MESSAGE)

Sets the message that gets used when rejecting messages πŸ“©. This string can contain the substring %H, which gets replaced by the matching header name. Cute, right?

This method returns a reference to the object itself, so you can chain these calls together like a little accessory stack πŸ’…βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Todd Vierling, <tv@duh.org> <tv@pobox.com>


🌈 SEE ALSO 🌈

  • Mail::Milter::Object

πŸ’€ POD ERRORS πŸ’€

Hey! The above document had some coding errors, which are explained below:

Around line 67:

    You can't have =items (as at line 79) unless the first thing after
    the =over is an =item

(not me calling out the pod's own glow-up fails 😭 the docs are still iconic tho)


and that's the whole page bestie!! this one came from perl v5.36.0, dated 2023-01-22, and yeah the man page header really does spell it Mail::...erRegex(3pm) like it got cut off mid-sentence πŸ’€ anyway mwah, go filter some headers πŸ’–πŸ¦‹

πŸ“¦ where this page comes from