I currently have two domains set on my server on two different IPs. One is set on the domain's primary IP, and the second on a failover IP. Let's say I have domain1.com and domain2.com
Currently, the mailer daemon delivers from MAILER-DAEMON@domain2.com, originally, postfix was setup with domain2. I would like it to send from domain1 instead. I have no idea what makes postfix select domain2 over domain1.
I've seen Rename mailer-daemon in postfix on the issue, but I don't want to "rename" mailer-daemon, I want to change the domain mailer-daemon is using by default.
Best Answer
You probably have your original domain in
$mydomain
, so change that.From the Postfix Basic Configuration: