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 = staticostmaster@domainassword 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 postmaster@domainass @domain2 postmaster@domain2ass @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!
Did you run postmap smtp_sasl_passwd after setting the passwords? (it might need a postfix restart too)
Yes I did it, It creates the db file. But unlikely It doesn't work... There's something here because direct it works
The sasl password map is a lookup for the remote mail gateway, not for a domain, and you should put the server name in brackets (ie. [smtp.eu.mailgun.org]); see the examples at http://www.postfix.org/SASL_README.html#client_sasl