Self-hosted dovecot IMAP server cannot be registered
Open
Nobody has claimed this yet.
0. to triage
bug
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Set up dovecot IMAP server using standard configuration with PAM authentication, test that dovecot authentication works with doveadm
- Try to register this on Nextcloud Mail
- Error message "There was an error while setting up your account"
Expected behavior
IMAP account should be registered and emails shown
Actual behavior
Error message "There was an error while setting up your account" is shown on registration screen.
Logs:
Exception: explode(): Argument #2 ($string) must be of type string, array given in file '/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php' line 291
var/www/nextcloud/lib/private/AppFramework/App.php - line 183:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 315:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1068:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()
Caused by TypeError: explode(): Argument #2 ($string) must be of type string, array given
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 291:
explode()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4864:
Horde_Imap_Client_Socket->_parseCapability()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4611:
Horde_Imap_Client_Socket->_responseCode()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4348:
Horde_Imap_Client_Socket->_getLine()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 4276:
Horde_Imap_Client_Socket->_sendCmdChunk()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 884:
Horde_Imap_Client_Socket->_sendCmd()
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php - line 546:
Horde_Imap_Client_Socket->_tryLogin("*** sensiti ... *")
/var/www/nextcloud/apps/mail/lib/IMAP/ImapClientRateLimitingDecorator.php - line 73:
Horde_Imap_Client_Socket->_login("*** sensiti ... *")
/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php - line 853:
OCA\Mail\IMAP\ImapClientRateLimitingDecorator->_login("*** sensiti ... *")
/var/www/nextcloud/apps/mail/lib/Service/SetupService.php - line 147:
Horde_Imap_Client_Base->login("*** sensiti ... *")
/var/www/nextcloud/apps/mail/lib/Service/SetupService.php - line 127:
OCA\Mail\Service\SetupService->testConnectivity()
/var/www/nextcloud/apps/mail/lib/Controller/AccountsController.php - line 388:
OCA\Mail\Service\SetupService->createNewAccount("*** sensiti ... *")
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 230:
OCA\Mail\Controller\AccountsController->create("*** sensiti ... *")
/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 137:
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/nextcloud/lib/private/AppFramework/App.php - line 183:
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/nextcloud/lib/private/Route/Router.php - line 315:
OC\AppFramework\App::main()
/var/www/nextcloud/lib/base.php - line 1068:
OC\Route\Router->match()
/var/www/nextcloud/index.php - line 36:
OC::handleRequest()
Mail app version
3.4.4
Mailserver or service
Dovecot
Operating system
Ubuntu 22.04
PHP engine version
PHP 8.2
Web server
Nginx
Database
PostgreSQL
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php at line 291 and follow the parseCapability call in the reported stack trace. Review the connection path through apps/mail/lib/Service/SetupService.php, then reproduce registration against Dovecot; done means the account registers without the exception and emails are shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100