[pfx] Re: Disable Non Delivery Notifications only for some adresses
23.05.2024 15:38, Kevin Cousin via Postfix-users пишет: Le 2024-05-21T22:50:48.000+02:00, Wietse Venema via Postfix-users a écrit : Kevin Cousin via Postfix-users: . . . 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 } Kevin Thank you! This is exactly what I need. Regards, Alexandr ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Disable Non Delivery Notifications only for some adresses
Le 2024-05-21T22:50:48.000+02:00, Wietse Venema via Postfix-users 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
[pfx] Re: Disable Non Delivery Notifications only for some adresses
Le 2024-05-22T10:15:34.000+02:00, Matus UHLAR - fantomas via Postfix-users a écrit : > On 21.05.24 15:13, Kevin Cousin via Postfix-users wrote: >> 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. > > how do you handle situations when you send mail to non-existing > recipient? > > because keeping sendins mail to them may cause troubles. I don't have any control of recipients. When users (aka apps we host) sends mails to non-existing recipient, the mails are bounced, as usual in Postfix. Thats the trouble I try to avoid to our Postfix instances. Some teams are cleaning their mail database periodically, but the email adress came from end-users. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Disable Non Delivery Notifications only for some adresses
On 21.05.24 15:13, Kevin Cousin via Postfix-users wrote: 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. how do you handle situations when you send mail to non-existing recipient? because keeping sendins mail to them may cause troubles. -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Nothing is fool-proof to a talented fool. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Disable Non Delivery Notifications only for some adresses
Can I have multi-smtpd instances by updating master.cf? for example, one instance for handling domain a.com, another instance for b.com. The two instances have different policies for incoming messages. Thanks. Configure a dedicated smtpd servicce in master.cf. Then use ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: Disable Non Delivery Notifications only for some adresses
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