1

Topic: SMTP Error (535): Authentication failed.

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

I have migrated mail accounts from an old mail server,run all the ldap update scripts,i am able to login to the webmail on the new server,but when i test sending email from the webmail i get error:  SMTP Error (535): Authentication failed.

May 24 12:56:32 pop4 postfix/submission/smtpd[20087]: Anonymous TLS connection established from pop4.simbanet.co.tz[127.0.0.1]: TLSv1 with cipher 
May 24 12:56:34 pop4 postfix/submission/smtpd[20087]: warning: hostname[127.0.0.1]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
May 24 12:56:34 pop4 roundcube: ERROR: Invalid response code received from server (535)

----

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

2

Re: SMTP Error (535): Authentication failed.

i turned on the debug mode dovecot and ldap below is what i  see

May 24 14:10:55 auth: Debug: ldap(user@domain.com,127.0.0.1): bind search: base=o=domains,dc=simbanet,dc=co,dc=tz filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=user@domain.com)(&(enabledService=shadowaddress)(shadowAddress=user@domain.com))))
May 24 14:10:55 auth: Debug: ldap(user@domain.com,127.0.0.1): no fields returned by the server
May 24 14:10:55 auth: Info: ldap(user@domain.com,127.0.0.1): unknown user
May 24 14:10:57 auth: Debug: client passdb out: FAIL    1       user=user@domain.com

any one with an input please?

3

Re: SMTP Error (535): Authentication failed.

It says "no fields returned by the server". that means no such user. Do you have any account matches below LDAP query filter?

Bozra wrote:

(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=user@domain.com)(&(enabledService=shadowaddress)(shadowAddress=user@domain.com))))

4

Re: SMTP Error (535): Authentication failed.

i only edited the user on my below post,but the  actual user exists and i have logged in on webmail as that user.

ZhangHuangbin wrote:

It says "no fields returned by the server". that means no such user. Do you have any account matches below LDAP query filter?

Bozra wrote:

(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=user@domain.com)(&(enabledService=shadowaddress)(shadowAddress=user@domain.com))))

5

Re: SMTP Error (535): Authentication failed.

Thanks, i managed to find the cause after i run  ldap search on the real email account

ldapsearch -x -D 'cn=Manager,dc=domain,dc=com' -W "(mail=user@domain.com)

and then compared the result to ldap query filter,  i found that  the real email account was missing an attribute "enabledService=smtpsecured"

i  run update updateLDAPValues_061_to_070.py  and that sorted the problem.



Bozra wrote:

i only edited the user on my below post,but the  actual user exists and i have logged in on webmail as that user.

ZhangHuangbin wrote:

It says "no fields returned by the server". that means no such user. Do you have any account matches below LDAP query filter?

Bozra wrote:

(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtpsecured)(|(mail=user@domain.com)(&(enabledService=shadowaddress)(shadowAddress=user@domain.com))))