the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
1.01k stars 121 forks source link

error comes out - "server connection error #936

Closed alexdatur closed 1 year ago

alexdatur commented 1 year ago

I ran into a problem. I'm trying to link a yandex mailbox (before that it worked fine), added a domain, alias. I'm doing a test - it passes successfully with my mail login, but when I connect, an error comes out - "server connection error". This is strange considering that in the domain I click on the test, enter my username and password and everything works successfully.

NC25.0.3 Apache, Docker. SM - 2.25.4

Screenshot_5 Screenshot_4

alexdatur commented 1 year ago

ive try to install deprecated rainloop, same setup such snappymail, and rainloop is working great with yandex.ru mail. But snappy - is not. What can i do?

there is nothing about snappymail in logs

the-djmaze commented 1 year ago
  1. Nextcloud -> Admin -> Additional Settings
  2. Enable SnappyMail debug
  3. try login
  4. Analyze data/appdata_snappymail/_data_/_default_/logs/*.txt
alexdatur commented 1 year ago

When I click on the Debug checkbox, it just opens my background in NC, and nothing else happens. If I log into the Snappy app again, I see that the debug checkmark has not been installed.

Screenshot_6 Screenshot_7

the-djmaze commented 1 year ago

Then follow the link of the SnappyMail admin panel and do it there in the Config section https://github.com/the-djmaze/snappymail/wiki/FAQ#how-do-i-enable-logging

joergmschulz commented 1 year ago

the error is: [ERROR]: MailSo\Net\Exceptions\SocketAlreadyConnectedException

and it comes when using firefox, chrome. Safari seems to work.


2023-02-12 15:52:01.241][b1682e01] [ERROR]: MailSo\Net\Exceptions\SocketAlreadyConnectedException in /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/MailSo/Net/NetClient.php:95
Stack trace:
#0 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/MailSo/Imap/ImapClient.php(81): MailSo\Net\NetClient->Connect(Object(MailSo\Imap\Settings))
#1 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Model/Account.php(234): MailSo\Imap\ImapClient->Connect(Object(MailSo\Imap\Settings))
#2 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Actions/UserAuth.php(426): RainLoop\Model\Account->ImapConnectAndLogin(Object(RainLoop\Plugins\Manager), Object(MailSo\Imap\ImapClient), Object(RainLoop\Config\Application))
#3 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Actions/UserAuth.php(143): RainLoop\Actions->imapConnect(Object(RainLoop\Model\MainAccount), true)
#4 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Actions/User.php(43): RainLoop\Actions->LoginProcess(xx@yyyy....', '*******', true)
#5 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/ServiceActions.php(140): RainLoop\Actions->DoLogin()
#6 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson('')
#7 /data/apps/snappymail/app/snappymail/v/2.26.0/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#8 /data/apps/snappymail/lib/Util/SnappyMailHelper.php(90): RainLoop\Service::Handle()
#9 /data/apps/snappymail/lib/Controller/PageController.php(114): OCA\SnappyMail\Util\SnappyMailHelper::startApp(true)
#10 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(225): OCA\SnappyMail\Controller\PageController->indexPost()
#11 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(133): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#12 /www/nextcloud/lib/private/AppFramework/App.php(172): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#13 /www/nextcloud/lib/private/Route/Router.php(298): OC\AppFramework\App::main('PageController', 'indexPost', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#14 /www/nextcloud/lib/base.php(1047): OC\Route\Router->match('/apps/snappymai...')
#15 /www/nextcloud/index.php(36): OC::handleRequest()
#16 {main}
joergmschulz commented 1 year ago

Thank you for fixing so fast - what's the release plan? Didn't manage to build the app from src (but when the release plan isn't soon, I'll retry)

the-djmaze commented 1 year ago

It's not really a fix, it's a workaround

joergmschulz commented 1 year ago

@the-djmaze sorry, this fix didn't repair it. Still:

The userid/password combination is correct. Other valid userid/password combinations don't work neither. Using another nextcloud user, the login works with the same credentials.

2023-02-15 10:17:57.023][8c4996c8] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException: AUTHENTICATIONFAILED Authentication failed. in /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Imap/ImapClient.php(538): MailSo\Imap\ResponseCollection->validate()
#1 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Imap/ImapClient.php(461): MailSo\Imap\ImapClient->getResponse()
#2 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Imap/ImapClient.php(181): MailSo\Imap\ImapClient->SendRequestGetResponse('AUTHENTICATE', Array)
#3 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Model/Account.php(297): MailSo\Imap\ImapClient->Login(Object(MailSo\Imap\Settings))
#4 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Model/Account.php(238): RainLoop\Model\Account->netClientLogin(Object(MailSo\Imap\ImapClient), Object(RainLoop\Plugins\Manager), Object(MailSo\Imap\Settings))
#5 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Actions/UserAuth.php(426): RainLoop\Model\Account->ImapConnectAndLogin(Object(RainLoop\Plugins\Manager), Object(MailSo\Imap\ImapClient), Object(RainLoop\Config\Application))
#6 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Actions/UserAuth.php(143): RainLoop\Actions->imapConnect(Object(RainLoop\Model\MainAccount), true)
#7 /data/apps/snappymail/lib/Util/SnappyMailHelper.php(77): RainLoop\Actions->LoginProcess('**@xxxxx....', '*******', false)
#8 /data/apps/snappymail/lib/Controller/PageController.php(114): OCA\SnappyMail\Util\SnappyMailHelper::startApp(true)
#9 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(225): OCA\SnappyMail\Controller\PageController->indexPost()
#10 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(133): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#11 /www/nextcloud/lib/private/AppFramework/App.php(172): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#12 /www/nextcloud/lib/private/Route/Router.php(298): OC\AppFramework\App::main('PageController', 'indexPost', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#13 /www/nextcloud/lib/base.php(1047): OC\Route\Router->match('/apps/snappymai...')
#14 /www/nextcloud/index.php(36): OC::handleRequest()
#15 {main}
[2023-02-15 10:17:59.894][8c4996c8] IMAP[ERROR]: MailSo\Net\Exceptions\SocketAlreadyConnectedException in /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Net/NetClient.php:95
Stack trace:
#0 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/MailSo/Imap/ImapClient.php(81): MailSo\Net\NetClient->Connect(Object(MailSo\Imap\Settings))
#1 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Model/Account.php(234): MailSo\Imap\ImapClient->Connect(Object(MailSo\Imap\Settings))
#2 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Actions/UserAuth.php(426): RainLoop\Model\Account->ImapConnectAndLogin(Object(RainLoop\Plugins\Manager), Object(MailSo\Imap\ImapClient), Object(RainLoop\Config\Application))
#3 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Actions/UserAuth.php(143): RainLoop\Actions->imapConnect(Object(RainLoop\Model\MainAccount), true)
#4 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Actions/User.php(43): RainLoop\Actions->LoginProcess('**@xxxx.de', '*******', true)
#5 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/ServiceActions.php(140): RainLoop\Actions->DoLogin()
#6 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson('')
#7 /data/apps/snappymail/app/snappymail/v/2.26.1/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#8 /data/apps/snappymail/lib/Util/SnappyMailHelper.php(90): RainLoop\Service::Handle()
#9 /data/apps/snappymail/lib/Controller/PageController.php(114): OCA\SnappyMail\Util\SnappyMailHelper::startApp(true)
#10 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(225): OCA\SnappyMail\Controller\PageController->indexPost()
#11 /www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(133): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#12 /www/nextcloud/lib/private/AppFramework/App.php(172): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\SnappyMail\Controller\PageController), 'indexPost')
#13 /www/nextcloud/lib/private/Route/Router.php(298): OC\AppFramework\App::main('PageController', 'indexPost', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#14 /www/nextcloud/lib/base.php(1047): OC\Route\Router->match('/apps/snappymai...')
#15 /www/nextcloud/index.php(36): OC::handleRequest()
#16 {main}
the-djmaze commented 1 year ago

The userid/password combination is correct.

Then why does it shout: AUTHENTICATIONFAILED

You should analyze why the login fails.

  1. Is the login to the right server?
  2. Is the login with/without @domain.com?
  3. Does the IMAP server require STARTTLS over port 143 or TLS port 993?

All info is inside the logs.

joergmschulz commented 1 year ago

Hi, yes, server is correct --> other nextcloud users can use the same credentials. Yes, the domain thing is checked and correct yes, it's 143 and starttls, this works as well for other nextcloud users. The tricky thing is: it stopped working 2 versions ago. It continues to work from the test environment which is a copy of prod. --> must be something in the nextcloud user settings. Maybe 2fa? All users that are working are not using 2fa.

the-djmaze commented 1 year ago

All users that are working are not using 2fa.

Then disable 2FA and see if that works. If not, open a new issue as it is not related to this issue

joergmschulz commented 1 year ago

it's not 2FA. Without 2FA it doesn't work either. Same issue. On all browsers.

grafik
joergmschulz commented 1 year ago

are there any user caches that can be deleted on nextcloud side? Like redis data?