Setting bounce address using postfix

I want to set the bounce address or return path address to a particular email address(say [email protected]). Such that whenever a mail bounces it will send a reply to [email protected]. How can I do that using postfix ?


Solution 1:

As per the RFC 2821, an NDR has to be sent to the "reverse-path" address specified with the MAIL FROM: command during the SMTP dialogue:

If an SMTP server has accepted the task of relaying the mail and later finds that the destination is incorrect or that the mail cannot be delivered for some other reason, then it MUST construct an "undeliverable mail" notification message and send it to the originator of the undeliverable mail (as indicated by the reverse-path).

This behavior cannot be changed.

If you want an additional address to be notified whenever NDRs are sent by your system, take a look at the Postfix notify_classes and the bounce_notice_recipient directive

Solution 2:

For details refer to the documentation for notify_classes and bounce_notice_recipient.

For your task add in /etc/postfix/main.cf:

bounce_notice_recipient =  [email protected]

Save the file, and run service postfix reload. Now when you will send a bounce mail you will receive bounced mail at [email protected].