Postfix:How to redirect to another mail server an email from from a sender

expuser2008 used Ask the Experts™
Have Postfix 2.6.6 on RedHat  which is used as an internal mail relay server for all incoming emails to be relayed to our exchange server. We are relaying emails destined to our domain ( ) to our exchange mail server ( ). This is done by /etc/postfix/transport containing " smtp:[10.10.01] ".
We also want to relay emails from a single email sender "sender@otherdomain"  to our exchange server at How can we do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer
Distinguished Expert 2018
it can be done by using  smtpd_send_restrictions....
In add: a check_send_access clause to the head of the smtp_send_restrictions key.

smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_redirect <, original content>

the file /etc/postfix/sender_redirect should then contain a list of addresses like: (1 per line). redirect
Adding lines like REJECT
should block mail from that user,and OK
Should allways be allowed

after that regenerate aliases etc.... (ie. postmap /etc/postfix/sender_redirect)


Thank you, it almost worked, but used in sender_redirect table " FILTER smtp:"
nociSoftware Engineer
Distinguished Expert 2018

Ah, did it of the top of my head... long time ago i did postfix, so i need to do a refresher if i need it again.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial