Redirecting all emails from a server to a mail list in Exchange

From MyWiki

Jump to: navigation, search

Two test servers 10.0.0.25 and 10.0.0.26 send emails out, which need to be re-directed to a mail distribution list in MS Exchange. Developers are members of the distribution list and that way they get all emails that may come out of the two servers.

So, I added the below to main.cf on Postfix SMTP gateway that the two servers send emails through:

smtpd_client_restrictions =
        check_client_access hash:/etc/postfix/client_access

In the /etc/postfix/client_access file I have:

10.0.0.25	REDIRECT	test@company.com
10.0.0.26	REDIRECT	test@company.com

Create the map:

# postmap hash:/etc/postfix/client_access

Reload postfix configuration and enjoy emails re-directed to test@company.com

Personal tools