How to force postfix to relay mails to other SMTP servers for particular domains

Brian Larkin

New Email
I'm new to postfix and could you some guidance. I have a task to send email for specific domains to another SMTP server. The rest of the email needs to go somewhere else. Is this a type of configuration that is supported by postfix?
 

popowich

EQ Forum Admin
Staff member
Hi Brian,

Yes, postfix supports this configuration. First, you'll need to find the config dir, typically /etc/postfix

Update /etc/postfix/transport configuration with the routes needed to relay email for specific domains to another smtp server. Then tell postfix it's updated with "postmap /etc/postfix/transport"

Next, in main.cf update your relayhost with the smtp server that all other email should be relayed to. When done run "postfix reload"
 

Similar threads

Top