Mail::...Editor(3pm)
π 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
- debian bookworm: libmail-milter-perl 0.07-2 Β· BSD-3-Clause
- ubuntu noble: libmail-milter-perl 0.07-2 Β· BSD-3-Clause
- ubuntu resolute: libmail-milter-perl 0.07-2 Β· BSD-3-Clause
- ubuntu stonking: libmail-milter-perl 0.07-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms