On 10.4.2012, at 19.28, Wietse Venema wrote:

> Timo Sirainen:
>>> I wonder if careful use of the DSN extension would help.  With DSN,
>>> the SMTP/LMTP client sends the original recipient with:
>>> 
>>>   RCPT TO:<final-rcpt> ORCPT=rfc822;orig-rcpt ...
>> 
>> Does Postfix already send this if LMTP server advertises DSN?
> 
> Yes :-) It's the same code for both SMTP and LMTP.

OK. I guess I'll look into adding DSN support then.

>>> One problem is that DSN hands off the responsibility to notify the
>>> sender about successful delivery.  I don't know if that is desirable.
>> 
>> Not necessarily a problem, but I can't seem to find any discussion
>> on how it should interact with Sieve. This is clear:
>> 
>> * NOTIFY=FAILURE + Sieve discard: Don't send DSN
>> 
>> But nothing else is. I'm guessing perhaps:
>> 
>> * NOTIFY=SUCCESS + Sieve discard: Send a success DSN
>> * NOTIFY=FAILURE + Sieve reject: Send a failure MDN, but no DSN
>> * NOTIFY=SUCCESS + Sieve reject: Send a failure MDN, but no DSN
>> * NOTIFY=FAILURE + Sieve ereject: Reject the mail on DATA reply, no DSN
>> * NOTIFY=SUCCESS + Sieve ereject: Reject the mail on DATA reply, no DSN
> 
> I think that reject/tempfail are easy - just report 5xx or 4xx at
> end-of-data time, and the MTA will take care of notification.

"ereject" can do that, but "reject" is specified to always send MDN. How the 
MDN is supposed to interact with DSN is a bit unclear. I was thinking that 
discard and reject could maybe be treated as if the delivery was successful and 
that the discard/reject was more of a post-delivery "client" operation. Anyway, 
I guess I'll go and ask in Sieve mailing list what others have done.

> With SUCCESS, the LMTP server would be responsible for sending the
> notification.  If the LMTP server already has the ability to "forward"
> mail, and if that code path can be reused, then sending the "success"
> notification might not cost a lot of extra code.

Yes, there's already existing code for sending DSN, so should be pretty easy to 
add.

Reply via email to