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

Discussion in 'Postfix' started by Brian Larkin, Jul 12, 2016.

  1. Brian Larkin

    Brian Larkin New Email

    Jul 12, 2016
    Likes Received:
    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?

  2. popowich

    popowich EQ Forum Admin Staff Member

    Aug 12, 2008
    Likes Received:
    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 update your relayhost with the smtp server that all other email should be relayed to. When done run "postfix reload"

Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.