Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

sender_dependent_relayhost_maps domain smtp

Tom Goring
2013-10-21
2013-10-21
  • Tom Goring
    Tom Goring
    2013-10-21

    Hi,

    I'm trying to set things up so that mail set from
    <anyuser>@domain1.com uses a relay of smtp.mailgun.org with a certain user/passwword
    and
    <anyuser>@domain1.com uses a relay of smtp.mailgun.org with a different user/passwword

    So I have main.cf

    relayhost =
    smtp_sender_dependent_authentication = yes
    sender_dependent_relayhost_maps = regexp:/etc/postfix/relayhost_map
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/passwd

    and relayhost_map

    /@jnet.ltd.uki$/ [smtp.mailgun.org]:465
    /@jnetapp.co.uk$/ [smtp.mailgun.org]:465

    But how do I define passwd file ? as the smtp host is the same?