Mail::...odeSRS(3pm)

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

πŸ’– NAME πŸ’–

Mail::Milter::Wrapper::DecodeSRS β€” bestie it's a milter wrapper that decodes your SRS-encoded return path ✨


🌸 SYNOPSIS 🌸

use Mail::Milter::Wrapper::DecodeSRS;

my $milter = ...;
my $wrapper = new Mail::Milter::Wrapper::DecodeSRS($milter);

my $wrapper2 = &DecodeSRS($milter); # convenience

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so Mail::Milter::Wrapper::DecodeSRS is this little convenience milter wrapper whose whole job β€” its moment, its era, its main character arc β€” is decoding MAIL FROM: return paths that got encoded by the Sender Rewrite Scheme, aka SRS. no cap πŸ’…

want the lore? it's at http://www.libsrs2.org/ 🫢

and the way that this wrapper internally understands both the SRS0 and SRS1 encoding schemes documented by the Mail::SRS author?? obsessed. literally iconic. ✨

the decoded address gets handed off to the contained milter through the envfrom callback, exactly the same way a raw address would be. periodt. πŸ’–

⚠️ NOTE: if the address is NOT SRS encoded, the contained milter is NOT called for the duration of the message β€” instead, SMFIS_ACCEPT is returned. πŸ’€ why? because the milter writer is expected to use this wrapper in a chain that also includes the contained milter without wrapping, so that a malicious sender can't use SRS to sneak past access checks. it's giving security. πŸ›‘οΈβœ¨

for instance, this is what a proper usage of this wrapper in a chain looks like:

my $envfrommilter = ...;

my $combinedmilter = new Mail::Milter::Chain(
    new Mail::Milter::Wrapper::UnwrapSRS($envfrommilter),
    $envfrommilter
);

and this behavior also hits if, like, the MTA already does one form of MAIL FROM: check, and the contained milter repeats that same database check against SRS rewritten addresses. (a good example would be a milter emulating Sendmail's access_db map.) πŸ“


πŸ‘‘ AUTHOR πŸ‘‘

Todd Vierling, <tv@duh.org> <tv@pobox.com> πŸ’œ


🌈 SEE ALSO 🌈

  • Mail::Milter::Wrapper

that's the whole vibe bestie, go slay πŸ’…πŸŽ€πŸ¦‹

perl v5.36.0 Β· 2023-01-22 Β· Mail::...odeSRS(3pm) β€” mwah, bye! πŸ’–βœ¨

πŸ“¦ where this page comes from