Mail::...ToRCPT(3pm)

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

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

okay bestie, this is a page from the User Contributed Perl Documentation, and it's literally the milter wrapper that delays your failure returns. yes. that's the whole vibe. let's go πŸ¦‹


✨ NAME ✨

Mail::Milter::Wrapper::DeferToRCPT β€” a milter wrapper whose entire job is to delay failure returns. she's patient, she's strategic, she's holding the L so the MTA doesn't have to. πŸ’…


🌸 SYNOPSIS 🌸

use Mail::Milter::Wrapper::DeferToRCPT;

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

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

not the &DeferToRCPT($milter) being right there as a lil convenience function 🫢 she said "you don't have to type the whole thing, i got you."


πŸŽ€ DESCRIPTION πŸŽ€

Mail::Milter::Wrapper::DeferToRCPT is a convenience milter wrapper, and what she does is defer any error return during the "connect", "helo", and/or "envfrom" callbacks all the way over to the "envrcpt" callback. it's giving "we'll deal with this later, babes." πŸ’–


😭 the problem (aka why she exists)

Many broken client mailers exist in the real world, and they do unhinged things like instantaneously reconnecting the second they get an error at the MAIL FROM: stage. truly not the behavior we asked for. πŸ™ˆ

This wrapper ensures that errors are never propagated back to the MTA until at least the RCPT TO: phase. no cap. she's holding them back like a bouncer. πŸ‘‘


πŸ¦‹ the two scopes, bestie, pay attention

  • Errors in "connect" and "helo" will apply to the entire SMTP transaction.
  • Errors in "envfrom" will only apply to that particular message.

one is a whole-relationship situation, the other is a "this one message and nothing more" situation. iykyk. ✨


πŸ’œ bonus feature: the logging glow-up

This wrapper can also be used to enhance logging! even if the contained milter is like "actually i wanna reject this mail in progress," it may be super useful β€” for logging purposes β€” to capture the HELO string, the sender, and the recipient addresses of each attempted mail. πŸ“

so you get receipts. receipts of every single attempt. iconic behavior honestly. 🌈


πŸ‘‘ AUTHOR πŸ‘‘

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

shoutout to Todd for real, we love a legend. 🫢


πŸ’€ SEE ALSO πŸ’€

  • Mail::Milter::Wrapper

🌟 and that's the page, bestie 🌟

signing off with the deets: this was written for perl v5.36.0, dated 2023-01-22, and it lives in Mail::...ToRCPT(3pm). πŸ’– go defer some errors, queen. slay. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from