Article 5HF8V Postfix - Send DSN replies from specific IP address depending on domain

Postfix - Send DSN replies from specific IP address depending on domain

by
AsgAnquietas
from LinuxQuestions.org on (#5HF8V)
Hello,

I need a little help configuring Postfix to send Delivery Status Notifications from specific IP. How can I do that ?

Scenario:

Server which has the Postfix installed has 5 NICs (I am using example IP addresses):

1.2.3.4 - Primary Server IP (routepoint for the 209.165.0.1/28) class
209.165.0.1 - Primary IP from a Custom IP subnet. - Domain1.com
209.165.0.2 - Secondary IP from a Custom IP subnet. - Domain2.com
209.165.0.3 - Tertiary IP from a Custom IP subnet. - Domain3.com

I already set the transport maps and everything I need, to instruct Postfix to send the email from specific IP (depending on our clients).
This one is working. No problem here.
Clients connect with Thunderbird to the Server, and depending on the FROM address, Postfix can automatically use the correct IP address to send, which checks all OpenDMARC and SPF Checks.

The problem is that an external client (from another domain) has requested a "Delivery Status Notification", and it seems that my Postfix server replies with its internal primary IP "1.2.3.4" address and with a specific domain, which causes the SPF Checks to fail.
For example, it should use "209.165.0.1" for domain1.com, "209.165.0.2" for domain2.com, and so on... even for DSN Messages !

How can I configure Postfix to reply to DSN Messages from specific IP (taking the domain name automatically from the "FROM:" header) ?

Thank you !latest?d=yIl2AUoC8zA latest?i=VTb7Bvz6x74:swMXMNbhkW0:F7zBnMy latest?i=VTb7Bvz6x74:swMXMNbhkW0:V_sGLiP latest?d=qj6IDK7rITs latest?i=VTb7Bvz6x74:swMXMNbhkW0:gIN9vFwVTb7Bvz6x74
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments