RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.08k stars 874 forks source link

Authentication failed for one email account while all others on same domain are working #2153

Open chrisnasulea opened 2 years ago

chrisnasulea commented 2 years ago

RainLoop version 1.16.0 installed on LAMP server, accessed using Google Chrome on Windows 10

Expected behavior and actual behavior: We use RainLoop as a webmail interface that connects through IMAP to a Microsoft Exchange server in order to read email and connects through SMTP to another server to send email. All of the email accounts are on the same domain and this configuration has been working flawlessly for some time now.

Today, one of the email accounts stopped authenticating in RainLoop and returns the "Authentication failed" message. To be clear, only one account has problems. We can authenticate successfully in RainLoop using all other Exchange email accounts hosted on the same server with the exception of the one for which I've included the logs below.

I've replaced all sensitive information in the logs below and I have verified that the user name and password are correct by logging in directly to the Exchange server through Outlook Web Access.

Logs:

[15:01:40.501][f4810d15] INFO[DATA]: [DATE:28.12.21][OFFSET:-00][RL:1.16.0][PHP:7.3.33][IP:my.ip.v4.ad][PID:3570][Apache][cgi-fcgi]
[15:01:40.501][f4810d15] INFO[DATA]: [APC:off][MB:on][PDO:mysql,odbc,pgsql,sqlite][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2]
[15:01:40.501][f4810d15] REQUEST[NOTE]: [POST] https://domain.tld/?/Ajax/&q[]=/0/
[15:01:40.504][f4810d15] AJAX[NOTE]: Action: DoLogin
[15:01:40.504][f4810d15] POST[DATA]: {"Email":"email@domain.tld","Login":"","Password":"password","Language":"","AdditionalCode":"","AdditionalCodeSignMe":"0","SignMe":"1","Action":"Login","XToken":"f142e51ef243a5f5031f971e1b984b4c"}
[15:01:40.516][f4810d15] IMAP[NOTE]: Start connection to "ssl://mail.server.tld:993"
[15:01:40.626][f4810d15] IMAP[NOTE]: Connected (success)
[15:01:40.626][f4810d15] IMAP[DATA]: < * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN] Server ready mail.server.proxy.domain.tld\r\n
[15:01:40.627][f4810d15] IMAP[DATA]: > TAG1 AUTHENTICATE PLAIN\r\n
[15:01:40.657][f4810d15] IMAP[DATA]: < + \r\n
[15:01:40.657][f4810d15] IMAP[SECURE]: > *******\r\n
[15:01:42.086][f4810d15] IMAP[DATA]: < TAG1 NO [AUTHENTICATIONFAILED] Authentication failed.\r\n
[15:01:42.087][f4810d15] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException: MailSo-Imap-Exceptions-NegativeResponseException (ImapClient.php ~ 1921) in /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php:1921
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(1998): MailSo\Imap\ImapClient->validateResponse(Array)
#1 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(283): MailSo\Imap\ImapClient->parseResponseWithValidation()
#2 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Mail/MailClient.php(93): MailSo\Imap\ImapClient->Login('email@domain....', 'password...', '', true, false)
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Model/Account.php(508): MailSo\Mail\MailClient->Login('email@domain....', 'password...', '', true, false)
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2153): RainLoop\Model\Account->IncConnectAndLoginHelper(Object(RainLoop\Plugins\Manager), Object(MailSo\Mail\MailClient), Object(RainLoop\Config\Application), Array)
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#6 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#7 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#8 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#9 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#10 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#11 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#12 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#13 /home/user/public_html/index.php(13): include('/home/user/p...')
#14 {main}
[15:01:42.088][f4810d15] IMAP[NOTICE]: MailSo\Imap\Exceptions\NegativeResponseException: MailSo-Imap-Exceptions-NegativeResponseException (ImapClient.php ~ 1921) in /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php:1921
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(1998): MailSo\Imap\ImapClient->validateResponse(Array)
#1 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(283): MailSo\Imap\ImapClient->parseResponseWithValidation()
#2 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Mail/MailClient.php(93): MailSo\Imap\ImapClient->Login('email@domain....', 'password...', '', true, false)
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Model/Account.php(508): MailSo\Mail\MailClient->Login('email@domain....', 'password...', '', true, false)
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2153): RainLoop\Model\Account->IncConnectAndLoginHelper(Object(RainLoop\Plugins\Manager), Object(MailSo\Mail\MailClient), Object(RainLoop\Config\Application), Array)
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#6 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#7 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#8 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#9 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#10 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#11 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#12 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#13 /home/user/public_html/index.php(13): include('/home/user/p...')
#14 {main}

Next MailSo\Imap\Exceptions\LoginBadCredentialsException: MailSo-Imap-Exceptions-LoginBadCredentialsException (ImapClient.php ~ 314) in /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php:314
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Mail/MailClient.php(93): MailSo\Imap\ImapClient->Login('email@domain....', 'password...', '', true, false)
#1 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Model/Account.php(508): MailSo\Mail\MailClient->Login('email@domain....', 'password...', '', true, false)
#2 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2153): RainLoop\Model\Account->IncConnectAndLoginHelper(Object(RainLoop\Plugins\Manager), Object(MailSo\Mail\MailClient), Object(RainLoop\Config\Application), Array)
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#6 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#7 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#8 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#9 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#10 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#11 /home/user/public_html/index.php(13): include('/home/user/p...')
#12 {main}
[15:01:42.089][f4810d15] INFO[ERROR]: MailSo\Imap\Exceptions\NegativeResponseException: MailSo-Imap-Exceptions-NegativeResponseException (ImapClient.php ~ 1921) in /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php:1921
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(1998): MailSo\Imap\ImapClient->validateResponse(Array)
#1 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php(283): MailSo\Imap\ImapClient->parseResponseWithValidation()
#2 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Mail/MailClient.php(93): MailSo\Imap\ImapClient->Login('email@domain....', 'password...', '', true, false)
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Model/Account.php(508): MailSo\Mail\MailClient->Login('email@domain....', 'password...', '', true, false)
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2153): RainLoop\Model\Account->IncConnectAndLoginHelper(Object(RainLoop\Plugins\Manager), Object(MailSo\Mail\MailClient), Object(RainLoop\Config\Application), Array)
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#6 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#7 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#8 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#9 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#10 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#11 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#12 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#13 /home/user/public_html/index.php(13): include('/home/user/p...')
#14 {main}

Next MailSo\Imap\Exceptions\LoginBadCredentialsException: MailSo-Imap-Exceptions-LoginBadCredentialsException (ImapClient.php ~ 314) in /home/user/public_html/v/1.16.0/app/libraries/MailSo/Imap/ImapClient.php:314
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/MailSo/Mail/MailClient.php(93): MailSo\Imap\ImapClient->Login('email@domain....', 'password...', '', true, false)
#1 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Model/Account.php(508): MailSo\Mail\MailClient->Login('email@domain....', 'password...', '', true, false)
#2 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2153): RainLoop\Model\Account->IncConnectAndLoginHelper(Object(RainLoop\Plugins\Manager), Object(MailSo\Mail\MailClient), Object(RainLoop\Config\Application), Array)
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#6 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#7 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#8 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#9 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#10 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#11 /home/user/public_html/index.php(13): include('/home/user/p...')
#12 {main}

Next RainLoop\Exceptions\ClientException: AuthError[102] in /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php:2172
Stack trace:
#0 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2404): RainLoop\Actions->CheckMailConnection(Object(RainLoop\Model\Account), true)
#1 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Actions.php(2456): RainLoop\Actions->LoginProcess('email@domain....', 'password...', 'c0f11cb6cee4a41...', '', false)
#2 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/ServiceActions.php(174): RainLoop\Actions->DoLogin()
#3 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(151): RainLoop\ServiceActions->ServiceAjax('')
#4 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(62): RainLoop\Service->localHandle()
#5 /home/user/public_html/v/1.16.0/app/libraries/RainLoop/Service.php(85): RainLoop\Service->__construct()
#6 /home/user/public_html/v/1.16.0/app/handle.php(94): RainLoop\Service::Handle()
#7 /home/user/public_html/v/1.16.0/include.php(243): include('/home/user/p...')
#8 /home/user/public_html/index.php(13): include('/home/user/p...')
#9 {main}
[15:01:42.089][f4810d15] AJAX[DATA]: {"Action":"Login","Result":false,"ErrorCode":102,"ErrorMessage":"","ErrorMessageAdditional":"","Time":1634}
[15:01:42.109][f4810d15] INFO[MEMORY]: Memory peak usage: 6MB
[15:01:42.109][f4810d15] INFO[TIME]: Time delta: 1.6502380371094
[15:01:42.110][f4810d15] IMAP[NOTE]: Disconnected from "ssl://mail.server.tld:993" (success)

Any input is most welcome. We've been looking at this from all sides for a few hours now and can't seem to figure it out.

the-djmaze commented 2 years ago

Either the password is wrong or IMAP access is revoked in Exchange server?

chrisnasulea commented 2 years ago

The password is correct and IMAP access is enabled.

However, we now believe that it is an Exchange problem after all. That one particular account isn't working through IMAP on Outlook for Windows either. All other accounts on the same exchange server work without issues but this one still doesn't.

We've tried resetting the password, disabling and re-enabling IMAP. The only thing we haven't done is to download all the contents of the mailbox, delete it, recreate it and upload the messages back to the new account.

The Exchange Server admin is still working on the issue, but has found no solution yet.