Use smarthost for some domains

Discussion in 'Tips/Tricks/Mods' started by iqpascal, Apr 13, 2018.

  1. iqpascal

    iqpascal Member

    I am a noob on Postfix as I have used Exim for like 20 years or so. Because mail delivery to and and other domains is sometimes sucky (either mail gets send to spam or gets accepted and goes nowhere) I use smtp2go for some domain names on Exim. But how can I do this with Postfix? There is a howto on smtp2go site for all mail ( but not for some domain names.

    I read about rerouting some domains by using /etc/postfix/transport but I do not get how this works for smtp2go (as you need to use login credentials for this service)
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Transports are probably the right way to go. You can add transports in ISPconfig. See Mail > Email routing
  3. iqpascal

    iqpascal Member

    Thank you for pointing me in the right direction.

    So I did this:
    Added to the relay recipients
    Added to the Email routing with destination

    And changed with:

    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/relay_passwords
    smtp_sasl_security_options = noanonymous
    smtp_tls_security_level = may
    Contents of relay_passwords is:

    Code: username:password
    postmap /etc/postfix/relay_password

    And restart postfix

    And that seems to work. It uses login credentials for and routes all but to the MX in the DNS. And gmail goes to

    Perhaps this is tutorial worthy if there are no mistakes in my config?
    ahrasis and till like this.

Share This Page