1

Topic: SMTP error

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

====

I tried to setup email from Odoo v9 (www.odoo.com) to the email server and send email from it.

After checking the SMTP connection and Odoo reported it has been setup successfully. I checked the mail.log and saw the followings:

Jun  1 05:21:38 mail postfix/submission/smtpd[4679]: connect from www.bqtoolbox.com[128.199.89.31]

Jun  1 05:21:38 mail postfix/submission/smtpd[4679]: Anonymous TLS connection established from www.bqtoolbox.com[128.199.89.31]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)

But when I tried to send email, the software show error as follows:

Mail delivery failed via SMTP server 'smtp.bqtoolbox.com'.
SMTPRecipientsRefused: {'quy.hoang@bqtoolbox.com': (554, '5.7.1 <quy.hoang@bqtoolbox.com>: Recipient address rejected: Sender is not same as SMTP authenticate username')}

and the mail.log file showed:

Jun  1 05:39:06 mail postfix/anvil[6265]: statistics: max connection rate 1/60s for (submission:128.199.89.31) at Jun  1 05:34:19
Jun  1 05:39:06 mail postfix/anvil[6265]: statistics: max connection count 1 for (submission:128.199.89.31) at Jun  1 05:34:19
Jun  1 05:39:06 mail postfix/anvil[6265]: statistics: max cache size 1 at Jun  1 05:34:19
Jun  1 05:44:00 mail postfix/submission/smtpd[7449]: connect from www.bqtoolbox.com[128.199.89.31]
Jun  1 05:44:00 mail postfix/submission/smtpd[7449]: Anonymous TLS connection established from www.bqtoolbox.com[128.199.89.31]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Jun  1 05:44:00 mail postfix/submission/smtpd[7449]: NOQUEUE: reject: RCPT from www.bqtoolbox.com[128.199.89.31]: 554 5.7.1 <quy.hoang@bqtoolbox.com>: Recipient address rejected: Sender is not same as SMTP authenticate username; from=<postmaster-odoo@bqtoolbox.com> to=<quy.hoang@bqtoolbox.com> proto=ESMTP helo=<www.bqtoolbox.com>
Jun  1 05:44:00 mail postfix/submission/smtpd[7449]: disconnect from www.bqtoolbox.com[128.199.89.31] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8


Can you help me with that? I think that it is related to SMTP authentication or something. Odoo is a Python-based ERP software.

Thank you so much,
Quy

2

Re: SMTP error

quyhoang wrote:

SMTPRecipientsRefused: {'quy.hoang@xxx': (554, '5.7.1 <quy.hoang@xxx>: Recipient address rejected: Sender is not same as SMTP authenticate username')}

The SMTP SASL username is not same as the address in "From:" (mail header). Please fix it.
Or, if you allow this SMTP SASL AUTH username to send email as different senders, please add this setting in /opt/iredapd/settings.py, then restart iRedAPD service:

ALLOWED_LOGIN_MISMATCH_SENDERS = ['your_sasl_auth_username']

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: SMTP error

ZhangHuangbin wrote:
quyhoang wrote:

SMTPRecipientsRefused: {'quy.hoang@xxx': (554, '5.7.1 <quy.hoang@xxx>: Recipient address rejected: Sender is not same as SMTP authenticate username')}

The SMTP SASL username is not same as the address in "From:" (mail header). Please fix it.
Or, if you allow this SMTP SASL AUTH username to send email as different senders, please add this setting in /opt/iredapd/settings.py, then restart iRedAPD service:

ALLOWED_LOGIN_MISMATCH_SENDERS = ['your_sasl_auth_username']

Can you have something like:

ALLOWED_LOGIN_MISMATCH_SENDERS = ['*']

To turn this off?

Thanks.

4 (edited by DaveQB 2017-04-20 13:14:13)

Re: SMTP error

ZhangHuangbin wrote:
quyhoang wrote:

SMTPRecipientsRefused: {'quy.hoang@xxx': (554, '5.7.1 <quy.hoang@xxx>: Recipient address rejected: Sender is not same as SMTP authenticate username')}

The SMTP SASL username is not same as the address in "From:" (mail header). Please fix it.
Or, if you allow this SMTP SASL AUTH username to send email as different senders, please add this setting in /opt/iredapd/settings.py, then restart iRedAPD service:

ALLOWED_LOGIN_MISMATCH_SENDERS = ['your_sasl_auth_username']

I added to /usr/local/www/iRedAdmin-0.7/settings.py

ALLOWED_LOGIN_MISMATCH_SENDERS = ['domain1.com', 'domain2.com', 'domain3.com', 'domain4.com']

then ran:

service iredapd restart

But same error though. Does iredapd have a log?

Thanks.

5

Re: SMTP error

DaveQB wrote:

Does iredapd have a log?

http://www.iredmail.org/docs/file.locat … ml#iredapd
http://www.iredmail.org/docs/debug.iredapd.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

6

Re: SMTP error

We just ran into the same issue.

My assumption would have been, that I'm allowed to send mail with sender addresses of aliases/groups that my user is member of.

I don't want to allow users to send mail from *any* sender address because that can be abused quite easily. But my users want to be able to send mail from their account aliases and group aliases.

Do think that this is a valid feature request?

7

Re: SMTP error

Ok, just found that iRedMail already supports what I was searching for: 'ALLOWED_LOGIN_MISMATCH_LIST_MEMBER = True'.

That's awesome. Thanks a lot and please excuse my ignorance to not read through default_settings.py earlier.

Maybe a short note mentioning this feature at Documentation -> Errors -> Recipient address rejected: Sender is not same as SMTP authenticate username would be a good idea.

8

Re: SMTP error

Updated the doc. Thanks for the feedback. smile

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee