Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to login on certain IMAP server since 2.34.2 (ie: imap.free.fr) #1438

Closed
ewandor opened this issue Feb 15, 2024 · 4 comments
Closed
Labels
bug Something isn't working workaround

Comments

@ewandor
Copy link

ewandor commented Feb 15, 2024

Describe the bug
Hello. Since updating to 2.34.2, I'm not able to access my imap account on imap.free.fr. After entering my credentials on the login page and clicking "Sign in", the spinner appears and then disappears, leaving me on the empty login page. This account was working fine with snappymail this morning before I upgraded Snappymail docker image to 2.34.2 from 2.33.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the login page
  2. Enter your credentials for imap.free.fr
  3. Click on 'Sign In'
  4. See error: you're back on the empty login page

Expected behavior
I'm able to see the list of my folders and their emails

Please complete the following information:

  • Browser: Librewolf 122.0-2, firefox 122.0.1, chromium 121.0.6167.160
  • IMAP daemon: Not known
  • PHP version: PHP8.2
  • SnappyMail Version: docker djmaze/snappymail:latest (2.34.2)
  • Mode: docker

Debug/logging information
Navigator's Request:
{"Action":"Folders"}

Response:
{"Action":"Folders","Result":false,"ErrorCode":999,"ErrorMessage":"0 - LIST failed: wildcards not permitted in username","ErrorMessageAdditional":"","epoch":1708002137}

Docker logs:

[2024-02-15 13:02:17.602][a08895f5] SERVICE[WARNING]:  LIST failed: wildcards not permitted in username
#0 /snappymail/snappymail/v/2.34.2/app/libraries/MailSo/Imap/ImapClient.php(584): MailSo\Imap\ResponseCollection->validate()
#1 /snappymail/snappymail/v/2.34.2/app/libraries/MailSo/Imap/Commands/Folders.php(514): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /snappymail/snappymail/v/2.34.2/app/libraries/MailSo/Imap/Commands/Folders.php(614): MailSo\Imap\ImapClient->FolderList('/home/', '*', false, true)
#3 /snappymail/snappymail/v/2.34.2/app/libraries/MailSo/Mail/MailClient.php(872): MailSo\Imap\ImapClient->FolderStatusList('/home/', '*')
#4 /snappymail/snappymail/v/2.34.2/app/libraries/RainLoop/Actions/Folders.php(63): MailSo\Mail\MailClient->Folders('/home/', '*', false)
#5 /snappymail/snappymail/v/2.34.2/app/libraries/RainLoop/ServiceActions.php(142): RainLoop\Actions->DoFolders()
#6 /snappymail/snappymail/v/2.34.2/app/libraries/RainLoop/Service.php(132): RainLoop\ServiceActions->ServiceJson('')
#7 /snappymail/snappymail/v/2.34.2/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#8 /snappymail/snappymail/v/2.34.2/include.php(127): RainLoop\Service::Handle()
#9 /snappymail/index.php(11): include('/snappymail/sna...')
#10 {main}
@ewandor
Copy link
Author

ewandor commented Feb 15, 2024

Here are the debug logs of a typical connection attempt to imap.free.fr:

[2024-02-15 15:21:50.204][aaf00f36] IMAP[DEBUG]: 0.31104779243469 (net session)

[2024-02-15 15:21:50.256][b8943d51] [INFO]: [SM:2.34.2][IP:xx.xx.xx.xx][PID:175][nginx/1.24.0][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][POST https://mail.domain.net/?/Json/&q[]=/0/]

[2024-02-15 15:21:50.261][b8943d51] JSON[INFO]: Action: DoFolders

[2024-02-15 15:21:50.261][b8943d51] POST[INFO]: {"Action":"Folders"}

[2024-02-15 15:21:50.262][b8943d51] IMAP[INFO]: Start connection to "ssl://imap.free.fr:993"

[2024-02-15 15:21:50.368][b8943d51] IMAP[INFO]: Connect (success)

[2024-02-15 15:21:50.368][b8943d51] IMAP[DEBUG]: 0.10603308677673 (raw connection)

[2024-02-15 15:21:50.427][b8943d51] IMAP[INFO]: < * OK IMAP4 ready\r\n

[2024-02-15 15:21:50.427][b8943d51] IMAP[DEBUG]: 0.16548800468445 (*)

[2024-02-15 15:21:50.428][b8943d51] IMAP[INFO]: > TAG1 CAPABILITY\r\n

[2024-02-15 15:21:50.444][b8943d51] IMAP[INFO]: < * CAPABILITY IMAP4REV1 X-NETSCAPE LOGIN-REFERRALS AUTH=PLAIN\r\n

[2024-02-15 15:21:50.444][b8943d51] IMAP[INFO]: < TAG1 OK completed\r\n

[2024-02-15 15:21:50.444][b8943d51] IMAP[DEBUG]: 0.016883850097656 (TAG1)

[2024-02-15 15:21:50.445][b8943d51] IMAP[INFO]: > TAG2 AUTHENTICATE PLAIN\r\n

[2024-02-15 15:21:50.462][b8943d51] IMAP[INFO]: < + \r\n

[2024-02-15 15:21:50.462][b8943d51] IMAP[DEBUG]: 0.01740288734436 (TAG2)

[2024-02-15 15:21:50.462][b8943d51] IMAP[INFO]: > *******\r\n

[2024-02-15 15:21:50.483][b8943d51] IMAP[INFO]: < TAG2 OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed\r\n

[2024-02-15 15:21:50.484][b8943d51] IMAP[INFO]: > TAG3 LIST "" "*" RETURN (SUBSCRIBED STATUS (MESSAGES UNSEEN UIDNEXT UIDVALIDITY HIGHESTMODSEQ))\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * LIST (\Subscribed \NoInferiors) "/" "Junk"\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * STATUS "Junk" (MESSAGES 0 UIDNEXT 2501 UIDVALIDITY 1 UNSEEN 0 HIGHESTMODSEQ 10212)\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * LIST (\Subscribed \HasNoChildren) "/" "Sent"\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * STATUS "Sent" (MESSAGES 66 UIDNEXT 3321 UIDVALIDITY 1 UNSEEN 0 HIGHESTMODSEQ 14800)\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * LIST (\Subscribed \HasNoChildren) "/" "Trash"\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < * STATUS "Trash" (MESSAGES 9 UIDNEXT 3560 UIDVALIDITY 1 UNSEEN 0 HIGHESTMODSEQ 16100)\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[INFO]: < TAG3 OK LIST completed\r\n

[2024-02-15 15:21:50.506][b8943d51] IMAP[DEBUG]: 0.022904872894287 (TAG3)

[2024-02-15 15:21:50.507][b8943d51] IMAP[INFO]: > TAG4 NAMESPACE\r\n

[2024-02-15 15:21:50.524][b8943d51] IMAP[INFO]: < * NAMESPACE (("" "/")) (("/home/" "/")) NIL\r\n

[2024-02-15 15:21:50.524][b8943d51] IMAP[INFO]: < TAG4 OK NAMESPACE completed\r\n

[2024-02-15 15:21:50.524][b8943d51] IMAP[DEBUG]: 0.01713490486145 (TAG4)
*
[2024-02-15 15:21:50.524][b8943d51] IMAP[INFO]: > TAG5 LIST "/home/" "*" RETURN (SUBSCRIBED STATUS (MESSAGES UNSEEN UIDNEXT UIDVALIDITY HIGHESTMODSEQ))\r\n

[2024-02-15 15:21:50.543][b8943d51] IMAP[INFO]: < TAG5 NO LIST failed: wildcards not permitted in username\r\n

[2024-02-15 15:21:50.544][b8943d51] IMAP[DEBUG]: 0.019613981246948 (TAG5)

[2024-02-15 15:21:50.544][b8943d51] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  LIST failed: wildcards not permitted in username in /snappymail/snappymail/v/2.34.2/app/libraries/MailSo/Imap/ResponseCollection.php:46

[2024-02-15 15:21:50.544][b8943d51] SERVICE[WARNING]:  LIST failed: wildcards not permitted in username

[2024-02-15 15:21:50.544][b8943d51] JSON[INFO]: {"Action":"Folders","Result":false,"ErrorCode":999,"ErrorMessage":"0 -  LIST failed: wildcards not permitted in username","ErrorMessageAdditional":"","epoch":1708010510}*

[2024-02-15 15:21:50.544][b8943d51] [INFO]: Memory peak usage: 2MB

[2024-02-15 15:21:50.544][b8943d51] [INFO]: Time delta: 0.2914137840271

[2024-02-15 15:21:50.545][b8943d51] IMAP[INFO]: > TAG6 LOGOUT\r\n

[2024-02-15 15:21:50.561][b8943d51] IMAP[INFO]: < * BYE zimbra73-e12.priv.proxad.net Zimbra IMAP4rev1 server closing connection\r\n

[2024-02-15 15:21:50.562][b8943d51] IMAP[INFO]: < TAG6 OK LOGOUT completed\r\n

[2024-02-15 15:21:50.562][b8943d51] IMAP[DEBUG]: 0.017028093338013 (TAG6)

[2024-02-15 15:21:50.565][b8943d51] IMAP[INFO]: Disconnected from "ssl://imap.free.fr:993" (success)

[2024-02-15 15:21:50.565][b8943d51] IMAP[DEBUG]: 0.30271100997925 (net session)

[2024-02-15 15:21:50.733][40a19afa] [INFO]: [SM:2.34.2][IP:xx.xx.xx.xx][PID:175][nginx/1.24.0][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][POST https://mail.domain.net/?/Json/&q[]=/0/]

[2024-02-15 15:21:50.739][40a19afa] JSON[INFO]: Action: DoLogout

[2024-02-15 15:21:50.739][40a19afa] POST[INFO]: {"Action":"Logout"}

[2024-02-15 15:21:50.739][40a19afa] smremember[NOTICE]: decrypt

[2024-02-15 15:21:50.739][40a19afa] JSON[INFO]: {"Action":"Logout","Result":true,"epoch":1708010510}

[2024-02-15 15:21:50.739][40a19afa] [INFO]: Memory peak usage: 2MB

[2024-02-15 15:21:50.739][40a19afa] [INFO]: Time delta: 0.0098330974578857

[2024-02-15 15:21:50.897][6053988f] [INFO]: [SM:2.34.2][IP:xx.xx.xx.xx][PID:175][nginx/1.24.0][fpm-fcgi][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET https://mail.domain.net/]

[2024-02-15 15:21:50.904][6053988f] [INFO]: Memory peak usage: 2MB

[2024-02-15 15:21:50.904][6053988f] [INFO]: Time delta: 0.012238025665283

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 15, 2024

NAMESPACE (("" "/")) (("/home/" "/")) NIL\r\n
...
TAG5 LIST "/home/" "*" RETURN (SUBSCRIBED STATUS (MESSAGES UNSEEN UIDNEXT UIDVALIDITY HIGHESTMODSEQ))\r\n
TAG5 NO LIST failed: wildcards not permitted in username\r\n

Admin -> Domains
Disable NAMESPACE for the domain.

I will make a check to skip crashing namespaces

@the-djmaze the-djmaze added bug Something isn't working workaround labels Feb 15, 2024
@ewandor
Copy link
Author

ewandor commented Feb 16, 2024

Thank you, the workaround works great in the meantime!

@the-djmaze
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workaround
Projects
None yet
Development

No branches or pull requests

2 participants