Mail::...Editor(3pm)

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

πŸ’– Mail::Milter::Wrapper::RejectMsgEditor πŸ’–

okay bestie, so this one lives in the User Contributed Perl Documentation section of the perl man pages, it's a 3pm page, and it is so handy. sit down, grab a strawberry πŸ“, let's get into it.


✨ NAME ✨

Mail::Milter::Wrapper::RejectMsgEditor β€” it's a milter wrapper whose whole entire job is editing your rejection messages. like, the glow-up era for your SMFIS_REJECT replies. πŸ’…


✨ SYNOPSIS ✨

the vibes, verbatim:

use Mail::Milter::Wrapper::RejectMsgEditor;

my $milter = ...;
my $wrapper = new Mail::Milter::Wrapper::RejectMsgEditor($milter, \&sub);

my $wrapper2 = &RejectMsgEditor($milter, \&sub); # convenience

notice that last one? that's the convenience form, iykyk. πŸŽ€


✨ DESCRIPTION ✨

so Mail::Milter::Wrapper::RejectMsgEditor is a convenience milter wrapper, and what it does is let you edit the messages that come back for all the SMFIS_REJECT rejections. every single one. no cap.

the subroutine you hand it should edit $_, and it does not need to return any value. like, no return statement, no stress, it's giving effortless. ✨

🫢 lowkey important: if the contained milter did not call $ctx->setreply() before returning a rejection code, then a default message will be used. so if you're like "why is my custom text not showing up" β€” that's probably why, bestie. πŸ’€

for example:

my $wrapped_milter = &RejectMsgEditor($milter, sub {
    s,$, - Please e-mail postmaster\@foo.com for assistance.,
});

see how it's just a little s,,, substitution on $_? she ate that. πŸ‘‘


✨ AUTHOR ✨

Todd Vierling, <tv@duh.org> <tv@pobox.com> β€” thank you for your service, icon. 🌸


✨ SEE ALSO ✨

  • Mail::Milter::Wrapper πŸ¦‹

and that's the whole page, bestie!! this was perl v5.36.0, dated 2023-01-22, and it's the Mail::...Editor(3pm) page from the User Contributed Perl Documentation. mwah πŸ’‹ go forth and reject people politely. 🌈

πŸ“¦ where this page comes from