1

Topic: External SMTP - Not Passing SASL username and password

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version:  CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?  no
- Related log if you're reporting an issue:
====

Hello all,

I am having some issues using Mailgun as my external smtp server for all accounts.

iRedMail works perfectly out of the box using the local server for sending all mail.  So no issues with that.

But as soon as I add these lines to my main.cf files, I get relay denied from Mailgun.

relayhost = [smtp.mailgun.org]:25
smtpd_sasl_auth_enable = yes
smtp_sasl_password_maps = static:XXXXXX:XXXXXXX
smtp_sasl_security_options = noanonymous
smtpd_tls_auth_only = yes

Mailgun has said that the sasl password is not being sent so that is why I am getting relaying denied.  No authentication.

My log looks like this.

Apr 14 14:59:44 testing postfix/smtp[24152]: B3F258800512: to=<michael@xxxxxxx.com>, relay=smtp.mailgun.org[54.149.68.173]:25, delay=0.55, delays=0.01/0.03/0.4/0.12, dsn=5.7.1, status=bounced (host smtp.mailgun.org[54.149.68.173] said: 550 5.7.1 Relaying denied (in reply to RCPT TO command))

I have also tried all ports.

It seems as if iRedMail has a conflict with sasl_password_maps. 

Any help?

Thanks.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: External SMTP - Not Passing SASL username and password

I guess you should use port 587 instead of 25?

3

Re: External SMTP - Not Passing SASL username and password

I have tried all of their ports.  25, 2525 and 587.  Same thing on all.

Mike

4

Re: External SMTP - Not Passing SASL username and password

Did you read mailgun official document? What's the suggested config?

5

Re: External SMTP - Not Passing SASL username and password

Yes, what I posted is the correct config for any external smtp service using postfix.

The issues is with iRedMail.  It is conflicting with something on postfix with outgoing authentication.

I did a test using Amazon's mail service and same thing.  So this is not just mailgun.  It's any smtp relay.  Postfix is not passing the sasl username and password correctly.  It looks like it is posting a blank username and password even though we have set: smtp_sasl_password_maps = static:XXXXXX:XXXXXXX

iRedMail is taking control over that some how.

Mike