[Mimedefang] Delaying 2xx as long as possible with stream_by_xyz()

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Fri Jan 27 03:50:53 EST 2017

Hash: SHA1

On Fri, 27 Jan 2017, Steffen Kaiser wrote:
> On Thu, 26 Jan 2017, Kevin A. McGrail wrote:
>> If not, can we do interactive SMTP responses such as checking the helo
>> values, then stream the messages to process it per domain or per recipient?

Um, what do you mean with "interactive SMTP responses such as checking the 
helo values"

I just forgot to point out the obvious:

Which state you are returning to the sender, if your streamed messages 
return different status'? E.g. it could sent to recipient one, but not two 
and recipient three tempfailed.

Maybe ...

>> I can't find it documented, but I seem to remember that once you stream the
>> messages per domain or per recipient, that you've given a 2xx DSN and 
>> closed
>> the session.  So if you then later find you want to decline, you have to
>> generate a bounce.
>> Any pointers appreciated especially if this is a milter limitation or an MD
>> framework limitation that I can figure out a way around!
> "If  users  are  in  different  domains,  stream_by_domain()  resends  the
> message  (once  to each domain) and returns 1 For example, if the original
> recipients are joe at abc.net,
>              jane at xyz.net and sue at abc.net, the original message is resent
> twice: One copy to joe at abc.net and sue at abc.net, and another copy to
> jane at xyz.net.  Also, any subsequent scanning  is
>              canceled (filter() and filter_end() will not be called for
> the original message) and the message is silently discarded."
> It's the last sentence, IMHO.
> But you *can* delay, I think:
>                  sub filter_begin {
>                        if (stream_by_recipient()) {

### Here you:
1) register the message in order to identify it later again
2) TEMPFAIL the message
3) your streamed messages somehow register their status with 1) within 
their own MIMEDefang sessions / processing

When the message is resent (maybe the list of recipients is different 
now), you check with the status and TEMPFAIL the message until you can 
make a decission.

>                             return;
>                        }
>                        # Rest of filter_begin
>                   }

- -- 
Steffen Kaiser
Version: GnuPG v1


More information about the MIMEDefang mailing list