Kevin Cousin via Postfix-users: > Hi, > > We are using Postfix as relay for our internal apps. This apps are > sending mails to final users with from nore...@example.net, but > sometimes, adresses are wrong and a Non delivery notification is > generated ans sent back to nore...@example.net. > > Is it any way to disable this notifications? only to "noreply@xxx"? > (without disabling NDN) ? > > It seems creating an header check To: noreply@ DISCARD is not the good > way.
Configure a dedicated smtpd servicce in master.cf. Then use https://www.postfix.org/postconf.5.html#smtpd_command_filter to append NOTIFY=NONE to RCPT TO commands. For example, to set up a no-bounce service on port 25: /etc/postfix/master.cf: :26 .. .. .. .. smtpd -o { smtpd_command_filter = pcre:/etc/postfix/no-notify.pcre } /etc/postfix/no-notify.pcre: # Bounce-never mail sink. # Use notify_classes=bounce,resource,software # to send bounced # mail to the postmaster (with message body removed). /^(RCPT\s+TO:\s*<.*>.*)\s+NOTIFY=\S+(.*)/ $1 NOTIFY=NEVER$2 /^(RCPT\s+TO:.*)/ $1 NOTIFY=NEVER Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org