Mailgun with multiple domains

Discussion in 'Installation/Configuration' started by alberto teruzzi, Oct 26, 2020.

  1. alberto teruzzi

    alberto teruzzi New Member

    Hello,
    I've found in this forum a guide about configuring your postfix with multiple domains, but I have a problem. (This was the post: https://www.howtoforge.com/communit...elays-for-different-domains-in-postfix.82711/)
    My question is, why if I configure my postfix in this way, it works fine.


    relayhost = smtp.eu.mailgun.org:587
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = static:p[email protected]:password
    smtp_sasl_security_options = noanonymous

    So avoiding the sasl_passwd and doing it directly. In this case, I've no problems; the emails leave the server and are going to be accepted from mailgun.


    But if configure following the guide:
    Postfix
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options = noanonymous
    smtp_sender_dependent_authentication = yes
    smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_passwd
    sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

    smtp_sasl_passwd
    @domain [email protected]:pass
    @domain2 [email protected]:pass

    @domain smtp.eu.mailgun.org:587
    @domain2 smtp.eu.mailgun.org:587

    I got back this error:
    smtp.eu.mailgun.org[3.122.29.183] said: 550 5.7.1 Relaying denied (in reply to MAIL FROM command))


    I've no idea...
    Thank to who would like to help me!
     
  2. Pete111

    Pete111 New Member

    Did you run
    postmap smtp_sasl_passwd
    after setting the passwords?
    (it might need a postfix restart too)
     
  3. alberto teruzzi

    alberto teruzzi New Member

    Yes I did it, It creates the db file.
    But unlikely It doesn't work...
    There's something here because direct it works
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

Share This Page