5

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

Souman Mandal
  • 85
  • 1
  • 2
  • 5

2 Answers2

6

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

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
4

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 =  someemail@example.com

Save the file, and run service postfix reload. Now when you will send a bounce mail you will receive bounced mail at someemail@example.com.

mgorven
  • 30,036
  • 7
  • 76
  • 121
ACHAL
  • 93
  • 1
  • 13
  • 1
    I try this same but still its not working. I just need to set boune addrss no matter what is my from address – Naveen Aug 02 '18 at 05:29
  • @Naveen, it actually works, but you must use the `notify_classes` setting mentioned in the answer, because by default it is not enabled. – Sam Sirry Aug 16 '22 at 06:50