I want postfix to stop sending non-delivery notifications to my local account, here is example from my log

17:47:08  A727B62C6F61: message-id=<20121124174708.A727B62C6F61@mail.***********>
17:47:08  F151362C6F5F: sender non-delivery notification: A727B62C6F61
17:47:08  A727B62C6F61: from=<>, size=4676, nrcpt=1 (queue active)
17:47:08  F151362C6F5F: removed
17:47:08  warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
17:47:08  A727B62C6F61: to=<**********>, relay=local, delay=0.01, delays=0/0.01/0/0, ...

How can I configure this in my main.cf?

migrated from stackoverflow.com Nov 25 '12 at 21:25

This question came from our site for professional and enthusiast programmers.

  • 1
    if you show us the full log of F151362C6F5F we might see why these bounces are generated in the first place and help you fix the real problem. disabling bounces is not the solution and strongly discouraged.. bounces are an important part of the email system. – Gryphius Nov 26 '12 at 13:14
  • 2
    He's not asking to disable bounces; he's talking about bounce notifications, which are configurable. – adaptr Nov 27 '12 at 13:00
  • @adaptr yep, this smart-assing about "you need to fix the root issue" while not seeing that bounce != bounce message has misled people away from working towards the answer... – Florian Heigl Feb 24 '17 at 23:00

The answer:

master.cf

bounce    unix  -       -       n       -       0       bounce

should be changed to:

master.cf

bounce    unix  -       -       n       -       0       discard
  • 6
    Some explanation of WHY is is bad should be given please, downvoters. – Asfand Qazi Mar 18 '15 at 11:57
  • Rewrote comment from Gryphius This solution will be disable bounce service, it is not the solution and strongly discouraged as bounces are an important part of the email system. Instead you should investigate why these bounces are generated in the first place and help you fix the real problem. – masegaloeh May 27 '16 at 10:31
  • 4
    @masegaloeh That is not a good reason, because in my case the bounce reason is pulled from the logs and the bounce message is a waste of resources. Totally not helpful of you to discourage an answer because it does not fit your, but other people's use case. – Phillipp Aug 31 '16 at 16:16

To control where bounce notifications are sent, and when, look at the following settings:

bounce_notice_recipient
notify_classes

Both are described here: http://www.postfix.org/bounce.8.html

  • It doesn't seem to allow me to cancel the notification only configure it to be sent to a place or configure what to report, I will do some testing with setting those setting to empty values and report back – David MZ Nov 29 '12 at 9:51
  • notify_classes= – adaptr Nov 29 '12 at 10:23
  • @adaptr: It doesn't seem to work. Leaving notify_classes empty will force postfix to return to default value (as it seems to me). I have similar problem as David. – koressak Mar 20 '13 at 7:46

The postconf docs list 8 types of notify classes: bounce, 2bounce, data, delay, policy, protocol, resource and software. I suggest the following:

notify_classes = 2bounce, data, delay, resource, software

You get notifications about bounced undeliverable mail, problems of postfix (data, resource and software) and mail that couldn't be delivered for technical reasons (can indicate a problem on your side, delay).

bounce and policy would notify you about rejected/bounced mail, and protocol about spammers or alike (they violate SMTP protocol)

  • The error class data has been supported since postfix 2.9. – hynekcer Jul 31 '14 at 14:34

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.