Le 2024-05-21T22:50:48.000+02:00, Wietse Venema via Postfix-users <postfix-users@postfix.org> a écrit :
> 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 > [http://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 [http://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 I need to filter mails with "RCPT TO: nore...@example.net" and send them to the new daemon ? When NDN are generated, they are send to cleanup, not throught smtpd if I understand correctly ? > Wietse Kevin
_______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org