Due to a server being compromised it is currently blacklisted at outlook.com/live.com , in order to restore email service I am trying to configure Postfix to deliver any received email for outlook.com/live.com via a specific IP address , Postfix will still listen for connections on port 25

So far I have created the following


sender_dependent_default_transport_maps = hash:/etc/postfix/sdd_transport.pcre


@outlook.com microsoft-smtp


microsoft-smtp unix - - n - - smtp -o smtp_bind_address=XX.XX.XXX.XX -o smtp_helo_name=mx.XXXXXXXX.com -o syslog_name=/var/log/mail.log.microsoft

Which all looks good, based on other guides, however connecting to does not return the correct smtp_helo name, and no file is written to /var/log

Have I missed something here?

  • I am fairly certain that you want your outgoing IP to depend on the receiver, not the envelope sender. – anx Apr 3 '18 at 14:40
  • Thank you, I have corrected this. I also noted that amavis is passing the mail back into postfix , so should I be declaring something amavis related for the routing ? – Gavin Lewandowski Apr 3 '18 at 14:40
  • Not having your complete config, its hard to do any guessing about amavis. – anx Apr 3 '18 at 15:04
  • Naming a file *.pcre but using it as regular lookup table.. sneaky. – anx Apr 3 '18 at 15:07

I dont think your setup is what you intended, but whats your problem right now is that you are unable to confirm your setup due to inadequate testing method.

Recommendation: Test your setup with an actual mail, by adding a second entry - one for a domain that does receive your mails regardless of which IP was used - to your transport map, then investigating the received mail for Received: headers confirming your setup.

-o smtp_bind_address=

connecting to does not return the correct smtp_helo name

Just because you tell postfix to bind to a certain IP when acting as an smtp client does not imply it would listen on that IP for incoming connections as a seperate smtp server ("smtpd"). Your smtpd listening on all interfaces and announcing its host name on that secondary IP aswell does not necessarily conflict with outgoing smtp connections using a different helo.


no file is written to /var/log

And no additional file should be created in typical syslog configurations. Its not a path, its just a note to be added to the generated log lines - those log lines still end up in the same file. Documentation says:


A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd".

  • Thank you amx, outgoing mail to any destination works as expected. If I understand the message flow it is as follows, Postfix receives message, Postfix passes to amavis, amavis passes to Postfix, Postfix delivers the message. What im struggling with is to route mail to specific destinations via a new IP which does not have a bad reputation. – Gavin Lewandowski Apr 4 '18 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.