Mail::Milter::Wrapper::DeferToRCPT(3) milter wrapper to delay failure returns


use Mail::Milter::Wrapper::DeferToRCPT;
my $milter = ...;
my $wrapper = new Mail::Milter::Wrapper::DeferToRCPT($milter);
my $wrapper2 = &DeferToRCPT($milter); # convenience


Mail::Milter::Wrapper::DeferToRCPT is a convenience milter wrapper which defers any error return during the ``connect'', ``helo'', and/or ``envfrom'' callbacks to the ``envrcpt'' callback.

Many broken client mailers exist in the real world and will do such things as instantaneously reconnect when receiving an error at the MAIL FROM: stage. This wrapper ensures that errors are never propagated back to the MTA until at least the RCPT TO: phase.

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

This wrapper can also be used to enhance logging. Though the contained milter may wish to reject a mail in progress, it may be useful for logging purposes to capture the HELO string, sender, and recipient addresses of each attempted mail.


Todd Vierling, <[email protected]> <[email protected]>