Erik Logtenberg:
> If I request a (success) DSN from my Postfix server, my server responds
> as expected. Usually my mail server has to deliver the mail remotely and
> I would like Postfix to request a DSN from the remote server as well if
> the user asked for one. Is that possible?

This is not defined in the DSN protocol, therefore not supported
officially. 

You may use the Postfix smtpd_command_filter feature to add DSN
options while Postfix receives mail via SMTP. With this, Postfix
pretends that the client always requests DSN=SUCCESS.

Untested example follows:

   /etc/postfix/main.cf:
       smtpd_command_filter = pcre:/etc/postfix/command_filter

   /etc/postfix/command_filter:
       /^(RCPT\s+TO:<.*>.*\s+NOTIFY=NEVER.*)/ $1
       /^(RCPT\s+TO:<.*>.*)\s+NOTIFY=(.*)/ $1 NOTIFY=SUCCESS,$2
       /^(RCPT\s+TO:.*)/                   $1 NOTIFY=SUCCESS

There is no equivalent for mail received via non-SMTP.

        Wietse

Reply via email to