Postfix: send all bounce messages to postmaster

9,868

Solution 1

In main.cf set notify_classes=bounce and bounce_notice_recipient=postmaster (which should be the default. And then postmaster gets the copies of every bounce message.

You MUST NOT disable bounces. They are needed to notify the sender! And as there has to be a sender for a mail, this particular sender will be informed.

What do you mean by "cannot necessarily initiate connections back to each of the senders"? The server never initiates a "connection" to the sender. It delivers a bounce into the inbox of the sender. And don't tell me that you allow people to send mails without having an account at the mail system.

Solution 2

Using canonical_maps to rewrite all local, Postfix-generated addresses should allow you to set the envelope address (different from the sender) and have the bounces returned to a central postmaster address. Maybe http://s19n.net/articles/2011/postfix_nullclient.html can give some hints:

/etc/postfix/main.cf
myhostname = host.example.com
canonical_maps = hash:/etc/postfix/canonical

/etc/postfix/canonical
@host.example.com   [email protected]
Share:
9,868

Related videos on Youtube

hellomynameisjoel
Author by

hellomynameisjoel

Updated on September 18, 2022

Comments

  • hellomynameisjoel
    hellomynameisjoel almost 2 years

    The situation is that we have a number of guests, say 80, sending through a central mail infrastructure out to the web. The way the network is setup the mail server cannot necessarily initiate connections back to each of the senders.

    I understand I can disable bounce messages completely by turning disabling the bounce daemon but I'm concerned if I do this I will miss system-problems. What would be good if all bounces went to postmaster and I could look for them there. There is no reason to ever try to contact the senders back.

    Any ideas how to achieve this? Googling mentioned NOTIFY=NEVER and some stuff about smtpd_command_filter although what I'm doing feels like it should be simpler than that. I can get the bounce messages to postmaster using notify_classes but I think that relies upon the bounce daemon.

    I'm running CentOS 5.5 and postfix 2.3.3-2.1.el5_2

    EDIT:

    soft_bounce=yes seems to be another way to disable bounces, but this is not exactly what I want

  • Stefan Profanter
    Stefan Profanter about 11 years
    You should also consider enabling resource and software problem notification: notify_classes = resource, software, bounce (see: hsc.fr/ressources/cours/postfix/doc/basic.html)
  • ticktockhouse
    ticktockhouse over 7 years
    This worked for me, I was trying to get the bounce address to be [email protected] rather than [email protected]! Helped me out a lot!
  • Jaime Hablutzel
    Jaime Hablutzel over 6 years
    cannot necessarily initiate connections back to each of the senders could mean that the server doesn't have outbound Internet connectivity to send bounces back to external servers, isn't it?.