Wietse Venema:
> Andreas Schulze:
> > 
> > Hello,
> > 
> > DSN for successfully deliveries are not enabled by default. They have  
> > to be requested
> > by an smtp client using extra parameter on RFC5321.MAILFROM an 
> > RFC5321.RCPTTO
> > 
> > But not every MUA has the ability to do this. Some years ago I had a  
> > requirement to
> > force DSN on successfully deliveries for every message send by a  
> > simple smtp client as a dedicated mailstream.
> > 
> > So I wrote a little patch to let postfix smtpd insert the necessary data.
> 
> There is no need to patch. Use smtpd_command_filter instead. See the
> examples in the postconf(5) manpage for how to modify MAIL FROM,
> RCPT TO, and so on.

Something like this (uses PCRE syntax) should do the job. The
first rule excludes clients that send NOTIFY options, and the
second adds forced NOTIFY for clients that don't.

/^(RCPT\s+TO:<.*>.*\s+NOTIFY=.*)/ $1
/^(RCPT\s+TO:<.*>.*)/ $1 NOTIFY=SUCCESS,DELAY,FAILURE

There is a problem with your patch: it turns off forced DSN for all
SMTP clients that are serviced by the same SMTP daemon process.

        Wietse

Reply via email to