1

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.

Billy K
  • 121
  • 1
  • 3
  • 16

1 Answers1

1

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

adaptr
  • 16,576
  • 23
  • 34