the-djmaze / snappymail

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

iCloud Account Not Working #850

Closed tomershvueli closed 1 year ago

tomershvueli commented 1 year ago

Describe the bug When trying to switch to an iCloud account in Snappymail, it will hang for longer than usual, and then boot me out to the login screen.

To Reproduce Steps to reproduce the behavior:

  1. Have Snappymail set up with any account
  2. Add an iCloud account from the admin portal (setup and credential instructions here)
  3. Switch to the iCloud account
  4. Get booted to the login screen

Expected behavior I should be able to view an inbox of my iCloud emails.

Screenshots If applicable, add screenshots to help explain your problem.

Please complete the following information:

Debug/logging information Place them here (few lines) or as attachments (many lines)

[2023-01-13 02:22:12.451][8088f975] IMAP[INFO]: < TAG24 BAD Parse Error (took 0 ms)\r\n
[2023-01-13 02:22:12.451][8088f975] IMAP[DEBUG]: 5.3913052082062 (TAG24)
[2023-01-13 02:22:12.451][8088f975] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  Parse Error (took 0 ms) in /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Imap/ImapClient.php(582): MailSo\Imap\ResponseCollection->validate()
#1 /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Imap/Commands/Metadata.php(83): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Imap/Commands/Folders.php(564): MailSo\Imap\ImapClient->getMetadata()
#3 /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Imap/Commands/Folders.php(596): MailSo\Imap\ImapClient->FolderList()
#4 /app/code/snappymail/v/2.24.4/app/libraries/MailSo/Mail/MailClient.php(816): MailSo\Imap\ImapClient->FolderStatusList()
#5 /app/code/snappymail/v/2.24.4/app/libraries/RainLoop/Actions/Folders.php(54): MailSo\Mail\MailClient->Folders()
#6 /app/code/snappymail/v/2.24.4/app/libraries/RainLoop/ServiceActions.php(137): RainLoop\Actions->DoFolders()
#7 /app/code/snappymail/v/2.24.4/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson()
#8 /app/code/snappymail/v/2.24.4/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#9 /app/code/snappymail/v/2.24.4/include.php(172): RainLoop\Service::Handle()
#10 /app/code/index.php(11): include('...')
#11 {main}
[2023-01-13 02:22:12.451][8088f975] IMAP[INFO]: > TAG25 GETMETADATA (DEPTH infinity) "Notes" ("/shared" "/private")\r\n

Additional context Thanks for all the great work that went into this application! I just switched over from Rainloop. For extra context, I'm using the Snappymail application from the Cloudron platform.

the-djmaze commented 1 year ago

Thanks!

Please report all TAG24 lines as the command is above the part you posted. Then we know more about what failed.

tomershvueli commented 1 year ago

Here's some more log context:

[2023-01-13 13:43:56.784][b5bb4c39] JSON[INFO]: Action: DoAccountSwitch
[2023-01-13 13:43:56.784][b5bb4c39] POST[INFO]: {"Email":{{my email}}","Action":"AccountSwitch","XToken":"token"}
[2023-01-13 13:43:57.586][b5bb4c39] COOKIE[DEBUG]: set smadditional
[2023-01-13 13:43:57.681][b5bb4c39] SQL[INFO]: SELECT MAX(value_int) FROM rainloop_system WHERE sys_name = ?
[2023-01-13 13:43:57.682][b5bb4c39] SQL[INFO]: SELECT id_user FROM rainloop_users WHERE rl_email = :rl_email
[2023-01-13 13:43:57.683][b5bb4c39] JSON[INFO]: {"Action":"AccountSwitch","Result":{"Email":"{{myemail}}","IncLogin":"{{myemail}}","OutLogin":"{{myemail}}","AccountHash":"02e54050a1b98ce0
b2cf308f102a5586","MainEmail":"{{my main email}}","ContactsIsAllowed":true,"SentFolder":"","DraftsFolder":"","JunkFolder":"","TrashFolder":"...
[2023-01-13 13:43:57.683][b5bb4c39] [INFO]: Memory peak usage: 2MB
[2023-01-13 13:43:57.683][b5bb4c39] [INFO]: Time delta: 0.90364098548889
[2023-01-13 13:43:58.021][03ecd01d] [INFO]: [SM:2.24.5][IP:172.18.0.1][PID:59][Apache/2.4.52 (Ubuntu)][apache2handler][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET domain
/]
[2023-01-13 13:43:58.033][03ecd01d] [INFO]: Memory peak usage: 2MB
[2023-01-13 13:43:58.033][03ecd01d] [INFO]: Time delta: 0.015895843505859
[2023-01-13 13:43:58.715][67363312] [INFO]: [SM:2.24.5][IP:172.18.0.1][PID:58][Apache/2.4.52 (Ubuntu)][apache2handler][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET domain
/?/AppData/0/7405384924897455/]
[2023-01-13 13:43:58.719][67363312] SQL[INFO]: SELECT MAX(value_int) FROM rainloop_system WHERE sys_name = ?
[2023-01-13 13:43:58.720][67363312] SQL[INFO]: SELECT id_user FROM rainloop_users WHERE rl_email = :rl_email
[2023-01-13 13:43:58.721][67363312] APPDATA[INFO]: rl.initData({"Auth":true,"Title":"tWebmail","LoadingDescription":"tWebmail","Plugins":[],"System":{"version":"2.24.5","token":"61bfa0a7dd53bca320216b7b1ef338f6aabdba93","languages":["ar-SA","bg-BG","cs-CZ","da-DK","de-DE","el-GR","en","en-GB","eo","es-ES","et-EE","eu","fa-IR","fi-FI","fr-FR","hu-HU","id-ID","is-IS","it-IT","ja-JP","ko-KR","lt-LT","lv-LV","nb-NO","nl-NL","pl-PL","pt","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","sv-SE","tr-TR","uk-UA","vi-VN","zh-CN","zh-TW"],"webPath":"\/","webVersionPath":"\/snappymail\/v\/2.24.5\/","allowHtmlEditorBitiButtons":false,"allowCtrlEnterOnCompose":true,"useImapThread":true,"allowAppendMessage":false,"folderSpecLimit":50,"listPermanentFiltered":false,"attachmentsActions":["zip"],"customLogoutLink":"","themes":["Default","A","Blurred","DarkShine","Linen","Love","Snow","SnowDarkV1","Squares","SquaresDark","Stripes","Wood","Xv","Clear"]},"AllowLanguagesOnLogin":true,"Email":"{{email}}","IncLogin":"{{email}}","OutLogin":"{{email}}","AccountHash":"hash","AccountSignMe":true,"MainEmail":"main email","MailToEmail":"","ContactsIsAllowed":true,"ViewHTML":true,"ShowImages":false,"RemoveColors":false,"ListInlineAttachments":false,"simpleAttachmentsList":false,"listGrouped":false,"MessagesPerPage":20,"MessageReadDelay":5,"MsgDefaultAction":1,"SoundNotification":true,"NotificationSound":"new-mail","DesktopNotifications":true,"Layout":1,"EditorDefaultType":"Html","UseCheckboxesInList":true,"AutoLogout":30,"UseThreads":false,"AllowDraftAutosave":true,"ReplySameFolder":false,"ContactsAutosave":true,"HideUnsubscribed":false,"HideDeleted":true,"ShowUnreadCount":false,"UnhideKolabFolders":false,"UserBackgroundName":"","UserBackgroundHash":"","SieveAllowFileintoInbox":false,"ContactsSync":{"Mode":0,"Url":"","User":"","Password":"","Interval":20},"SentFolder":"","DraftsFolder":"","JunkFolder":"","TrashFolder":"","ArchiveFolder":"","hourCycle":"","requestReadReceipt":false,"requestDsn":false,"pgpSign":false,"pgpEncrypt":false,"allowSpellcheck":false,"Resizer4Width":220,"Resizer5Width":680,"Resizer5Height":0,"fontSansSerif":"","fontSerif":"","fontMono":"","NewMailSounds":["alert","new-mail","ping"],"UseLocalProxyForExternalImages":true,"AllowLanguagesOnSettings":true,"Capa":{"AdditionalAccounts":true,"AttachmentThumbnails":true,"AttachmentsActions":true,"Contacts":true,"DangerousActions":true,"GnuPG":true,"Identities":true,"Kolab":false,"OpenPGP":true,"Quota":true,"Sieve":false,"Themes":true,"UserBackground":true},"AttachmentLimit":26214400,"PhpUploadSizes":{"upload_max_filesize":"25M","post_max_size":"25M"},"Theme":"SquaresDark","Language":"en","UserLanguage":"en","PluginsLink":"","StaticLibsJs":"\/snappymail\/v\/2.24.5\/static\/js\/min\/libs.min.js"});
[2023-01-13 13:43:58.721][67363312] [INFO]: Memory peak usage: 2MB
[2023-01-13 13:43:58.721][67363312] [INFO]: Time delta: 0.010619163513184
[2023-01-13 13:43:59.245][55741cbf] [INFO]: [SM:2.24.5][IP:172.18.0.1][PID:99][Apache/2.4.52 (Ubuntu)][apache2handler][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][POST domain/?/Json/&q[]=/0/]
[2023-01-13 13:43:59.245][55741cbf] JSON[INFO]: Action: DoFolders
[2023-01-13 13:43:59.245][55741cbf] POST[INFO]: {"Action":"Folders","XToken":"61bfa0a7dd53bca320216b7b1ef338f6aabdba93"}
[2023-01-13 13:43:59.248][55741cbf] IMAP[INFO]: Start connection to "ssl://imap.mail.me.com:993"
[2023-01-13 13:43:59.435][55741cbf] IMAP[INFO]: Connect (success)
[2023-01-13 13:43:59.435][55741cbf] IMAP[DEBUG]: 0.18765807151794 (raw connection)
[2023-01-13 13:43:59.525][55741cbf] IMAP[INFO]: < * OK [CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN] (2305B23-3b4049a93c9a) qs51p00im-qukt01092701.me.com\r\n
[2023-01-13 13:43:59.525][55741cbf] IMAP[DEBUG]: 0.27782607078552 (*)
[2023-01-13 13:43:59.526][55741cbf] IMAP[INFO]: > TAG1 AUTHENTICATE PLAIN *******\r\n
[2023-01-13 13:43:59.747][55741cbf] IMAP[INFO]: < TAG1 OK user {{username}} authenticated\r\n
[2023-01-13 13:43:59.748][55741cbf] IMAP[DEBUG]: 0.22194290161133 (TAG1)
[2023-01-13 13:43:59.748][55741cbf] IMAP[INFO]: > TAG2 CAPABILITY\r\n
[2023-01-13 13:43:59.837][55741cbf] IMAP[INFO]: < * CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 CONDSTORE ENABLE QRESYNC QUOTA XAPPLELITERAL NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES METADATA ID XMSEARCH X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP XUM1 MULTISEARCH 
IDLE X-APPLE-REMOTE-LINKS LIST-STATUS\r\n
[2023-01-13 13:43:59.838][55741cbf] IMAP[INFO]: < TAG2 OK Completed\r\n
[2023-01-13 13:43:59.838][55741cbf] IMAP[DEBUG]: 0.089937925338745 (TAG2)
[2023-01-13 13:43:59.839][55741cbf] IMAP[INFO]: > TAG3 GETMETADATA (DEPTH infinity) "*" ("/shared" "/private")\r\n
[2023-01-13 13:43:59.929][55741cbf] IMAP[INFO]: < TAG3 BAD Parse Error (took 0 ms)\r\n
[2023-01-13 13:43:59.930][55741cbf] IMAP[DEBUG]: 0.09083890914917 (TAG3)
[2023-01-13 13:43:59.932][55741cbf] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  Parse Error (took 0 ms) in /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ImapClient.php(582): MailSo\Imap\ResponseCollection->validate()
#1 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Metadata.php(37): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(502): MailSo\Imap\ImapClient->getAllMetadata()
#3 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(596): MailSo\Imap\ImapClient->FolderList()
#4 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Mail/MailClient.php(816): MailSo\Imap\ImapClient->FolderStatusList()
#5 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Actions/Folders.php(54): MailSo\Mail\MailClient->Folders()
#6 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/ServiceActions.php(137): RainLoop\Actions->DoFolders()
#7 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson()
#8 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#9 /app/code/snappymail/v/2.24.5/include.php(172): RainLoop\Service::Handle()
#10 /app/code/index.php(11): include('...')
#11 {main}
[2023-01-13 13:43:59.933][55741cbf] IMAP[INFO]: > TAG4 LIST "" "*" RETURN (STATUS (MESSAGES UNSEEN UIDNEXT UIDVALIDITY HIGHESTMODSEQ))\r\n
[2023-01-13 13:44:00.113][2394d829] [INFO]: [SM:2.24.5][IP:172.18.0.1][PID:58][Apache/2.4.52 (Ubuntu)][apache2handler][Streams:tcp,udp,unix,udg,ssl,tls,tlsv1.0,tlsv1.1,tlsv1.2,tlsv1.3][GET {{domain}}
]
[2023-01-13 13:44:00.149][2394d829] [INFO]: Memory peak usage: 2MB
[2023-01-13 13:44:00.149][2394d829] [INFO]: Time delta: 0.040534019470215
[2023-01-13 13:44:00.340][55741cbf] IMAP[INFO]: < * LIST () "/" "Current Classes"\r\n
[2023-01-13 13:44:00.340][55741cbf] IMAP[INFO]: < * STATUS "Current Classes" (MESSAGES 53 UNSEEN 0 UIDNEXT 838 UIDVALIDITY 1300472372 HIGHESTMODSEQ 383253513000400)\r\n
......
lots more folders
......
[2023-01-13 13:44:00.350][55741cbf] IMAP[INFO]: < TAG4 OK LIST completed (took 316 ms)\r\n
[2023-01-13 13:44:00.350][55741cbf] IMAP[DEBUG]: 0.41760396957397 (TAG4)
[2023-01-13 13:44:00.350][55741cbf] IMAP[INFO]: > TAG5 GETMETADATA (DEPTH infinity) "Current Classes" ("/shared" "/private")\r\n
[2023-01-13 13:44:00.446][55741cbf] IMAP[INFO]: < TAG5 BAD Parse Error (took 0 ms)\r\n
[2023-01-13 13:44:00.446][55741cbf] IMAP[DEBUG]: 0.095619916915894 (TAG5)
[2023-01-13 13:44:00.446][55741cbf] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  Parse Error (took 0 ms) in /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ImapClient.php(582): MailSo\Imap\ResponseCollection->validate()
#1 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Metadata.php(83): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(564): MailSo\Imap\ImapClient->getMetadata()
#3 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(596): MailSo\Imap\ImapClient->FolderList()
#4 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Mail/MailClient.php(816): MailSo\Imap\ImapClient->FolderStatusList()
#5 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Actions/Folders.php(54): MailSo\Mail\MailClient->Folders()
#6 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/ServiceActions.php(137): RainLoop\Actions->DoFolders()
#7 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson()
#8 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#9 /app/code/snappymail/v/2.24.5/include.php(172): RainLoop\Service::Handle()
#10 /app/code/index.php(11): include('...')
#11 {main}
[2023-01-13 13:44:00.446][55741cbf] IMAP[INFO]: > TAG6 GETMETADATA (DEPTH infinity) "Outbox" ("/shared" "/private")\r\n
[2023-01-13 13:44:00.537][55741cbf] IMAP[INFO]: < TAG6 BAD Parse Error (took 0 ms)\r\n
[2023-01-13 13:44:00.537][55741cbf] IMAP[DEBUG]: 0.090879917144775 (TAG6)
[2023-01-13 13:44:00.537][55741cbf] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  Parse Error (took 0 ms) in /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ImapClient.php(582): MailSo\Imap\ResponseCollection->validate()
#1 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Metadata.php(83): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(564): MailSo\Imap\ImapClient->getMetadata()
#3 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(596): MailSo\Imap\ImapClient->FolderList()
#4 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Mail/MailClient.php(816): MailSo\Imap\ImapClient->FolderStatusList()
#5 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Actions/Folders.php(54): MailSo\Mail\MailClient->Folders()
#6 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/ServiceActions.php(137): RainLoop\Actions->DoFolders()
#7 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(112): RainLoop\ServiceActions->ServiceJson()
#8 /app/code/snappymail/v/2.24.5/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#9 /app/code/snappymail/v/2.24.5/include.php(172): RainLoop\Service::Handle()
#10 /app/code/index.php(11): include('...')
#11 {main}
[2023-01-13 13:44:00.537][55741cbf] IMAP[INFO]: > TAG7 GETMETADATA (DEPTH infinity) "[Airmail]" ("/shared" "/private")\r\n
[2023-01-13 13:44:00.633][55741cbf] IMAP[INFO]: < TAG7 BAD Parse Error (took 0 ms)\r\n
[2023-01-13 13:44:00.633][55741cbf] IMAP[DEBUG]: 0.096159219741821 (TAG7)
[2023-01-13 13:44:00.633][55741cbf] IMAP[WARNING]: MailSo\Imap\Exceptions\NegativeResponseException:  Parse Error (took 0 ms) in /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ResponseCollection.php:46
Stack trace:
#0 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/ImapClient.php(582): MailSo\Imap\ResponseCollection->validate()
#1 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Metadata.php(83): MailSo\Imap\ImapClient->yieldUntaggedResponses()
#2 /app/code/snappymail/v/2.24.5/app/libraries/MailSo/Imap/Commands/Folders.php(564): MailSo\Imap\ImapClient->getMetadata()
the-djmaze commented 1 year ago

Go to admin -> domains and open the domain settings. Disable METADATA

tomershvueli commented 1 year ago

Worked like a charm! Thanks!

Luncheon3462 commented 9 months ago

I had the same issue and disabling METADATA allowed the account to load. However, it is not responsive to sorting by any snappy mail option (date, from, size, subject) Is that a result of removing metadata? Any other fix?