I have a number of servers at a hosting space. What is the best way or is it possible to run a relay on one of the system to

  1. send all emails to alerts@myowndomain.com to our email hosting service ? (we have our own DNS for myowndomain.com internally, but we host email service for the same domain on Microsoft 365. There's a public MX record)

  2. send emails to alerts@somemonitoring.com for our 3rd monitoring sevice?

Currently we tested running a dummy internal DNS to hardcode MX record for both myowndomain and monitoring.com. Postfix basically runs like a relay taking all emails and just forward out. I'm no expert of Postfix, wonder if this can be done correctly with postfix.


Postfix can do anything you can think of.

However, if all you're doing is sending mail OUT, just put hosts file entries for the desired relays on those servers, and use a nullclient like ssmtp to send mail.

To do this with postfix, make transport_maps entries for all recipients and steer them to the right relay.

Sundry is explained here:

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client http://www.postfix.org/ADDRESS_REWRITING_README.html#transport http://www.postfix.org/BASIC_CONFIGURATION_README.html#relayhost

  • yes, It is all outgoing email. I think it is a good idea to use the transport map. Thanks. – Billy K Oct 24 '12 at 18:03

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.