mail
mail copied to clipboard
Fetching mailbox fails with "Could not open mailbox"
Steps to reproduce
- Add a mailfence.com account
- Open one of "Junk", "Sent", "Trash", "Draft"
- Message "Could not open mailbox" is shown
Expected behavior
The messages in the folder should be shown.
Actual behavior
An error is shown
Mail app version
3.7.20
Nextcloud version
29.0.12
Mailserver or service
Mailfence
Operating system
Linux
PHP engine version
PHP 8.2
Nextcloud memory caching
valkey
Web server
Nginx
Database
PostgreSQL
Additional info
The network tab shows requests to messages?mailboxId=3&limit=20 failing with a 400 status and The server did not understand the request
Hi @Trivernis
Can you turn on debugging in your config and post the horde_imap.log from your data directory. We need to see the conversation between NC and your mail server.
This is the imap log. I [[REDACTED]] some parts with sensible information.
------------------------------
>> Tue, 18 Feb 2025 22:47:50 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1492 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.025 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3311 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0319 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 4 OK STATUS Completed
>> Command 4 took 0.0303 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 5 OK STATUS Completed
>> Command 5 took 0.0315 seconds.
C: 6 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0334 seconds.
C: 7 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0671 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 8 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.0308 seconds.
C: 9 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 9 OK SEARCH completed
>> Command 9 took 0.0251 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:47:52 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1361 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0266 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3305 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0334 seconds.
C: 4 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 4 OK LOGOUT Completed
>> Command 4 took 0.0349 seconds.
C: 10 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 10 OK LOGOUT Completed
>> Command 10 took 0.0255 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:48:02 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1033 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0246 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3385 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.032 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 4 OK STATUS Completed
>> Command 4 took 0.0311 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 5 OK STATUS Completed
>> Command 5 took 0.0316 seconds.
C: 6 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0321 seconds.
C: 7 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0629 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 8 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.0305 seconds.
C: 9 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 9 OK SEARCH completed
>> Command 9 took 0.0484 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:48:04 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.0815 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0219 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3336 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0327 seconds.
C: 4 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 4 OK LOGOUT Completed
>> Command 4 took 0.0232 seconds.
C: 10 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 10 OK LOGOUT Completed
>> Command 10 took 0.0273 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:48:31 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.0874 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0246 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3394 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0331 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 4 OK STATUS Completed
>> Command 4 took 0.0315 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 5 OK STATUS Completed
>> Command 5 took 0.0362 seconds.
C: 6 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0398 seconds.
C: 7 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0667 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 8 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.0303 seconds.
C: 9 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 9 OK SEARCH completed
>> Command 9 took 0.0556 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:48:32 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1085 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0258 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3571 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0394 seconds.
C: 4 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 4 OK LOGOUT Completed
>> Command 4 took 0.026 seconds.
C: 10 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 10 OK LOGOUT Completed
>> Command 10 took 0.0246 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:49:03 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1004 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0414 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3929 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0329 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 4 OK STATUS Completed
>> Command 4 took 0.042 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 5 OK STATUS Completed
>> Command 5 took 0.0313 seconds.
C: 6 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0334 seconds.
C: 7 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0707 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 8 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.0316 seconds.
C: 9 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 9 OK SEARCH completed
>> Command 9 took 0.0247 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:49:05 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1146 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0247 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3631 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0329 seconds.
C: 4 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 4 OK LOGOUT Completed
>> Command 4 took 0.0253 seconds.
C: 10 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 10 OK LOGOUT Completed
>> Command 10 took 0.0248 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:49:55 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.0876 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0248 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3345 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0331 seconds.
C: 4 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 4 OK STATUS Completed
>> Command 4 took 0.0561 seconds.
C: 5 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 5 OK STATUS Completed
>> Command 5 took 0.0326 seconds.
C: 6 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0367 seconds.
C: 7 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0723 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 8 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.0355 seconds.
C: 9 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 9 OK SEARCH completed
>> Command 9 took 0.0271 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:50:01 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1303 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0244 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3295 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 3 OK STATUS Completed
>> Command 3 took 0.0511 seconds.
C: 4 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 4 OK LOGOUT Completed
>> Command 4 took 0.025 seconds.
C: 10 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 10 OK LOGOUT Completed
>> Command 10 took 0.0263 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:50:19 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1199 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0335 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3408 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 NAMESPACE
S: * NAMESPACE (("" "/")) NIL NIL
S: 3 OK NAMESPACE Completed
>> Command 3 took 0.0245 seconds.
C: 4 LSUB "" *
S: * LSUB () "/" "INBOX"
S: * LSUB (\Sent) "/" "Sent Items"
S: * LSUB (\Drafts) "/" "Drafts"
S: * LSUB (\Trash) "/" "Trash"
S: * LSUB (\Junk) "/" "Spam?"
S: * LSUB () "/" "Protonmail"
S: 4 OK LSUB Completed
>> Command 4 took 0.153 seconds.
C: 5 LIST "" *
S: * LIST () "/" "INBOX"
S: * LIST (\Sent) "/" "Sent Items"
S: * LIST (\Drafts) "/" "Drafts"
S: * LIST (\Trash) "/" "Trash"
S: * LIST (\Junk) "/" "Spam?"
S: * LIST () "/" "Protonmail"
S: 5 OK LIST Completed
>> Command 5 took 0.1175 seconds.
C: 6 STATUS INBOX (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
C: 7 STATUS Drafts (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
C: 8 STATUS "Sent Items" (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
C: 9 STATUS Trash (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
C: 10 STATUS Spam? (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
C: 11 STATUS Protonmail (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
S: * STATUS INBOX (MESSAGES 12 RECENT 0 UNSEEN 0 UIDNEXT 14 UIDVALIDITY 647162421)
S: 6 OK STATUS Completed
>> Command 6 took 0.0286 seconds.
S: * STATUS Drafts (MESSAGES 0 RECENT 0 UNSEEN 0 UIDNEXT 8 UIDVALIDITY 647162423)
S: 7 OK STATUS Completed
>> Command 7 took 0.0504 seconds.
S: * STATUS "Sent Items" (MESSAGES 11 RECENT 0 UNSEEN 0 UIDNEXT 12 UIDVALIDITY 647162422)
S: 8 OK STATUS Completed
>> Command 8 took 0.1128 seconds.
S: * STATUS Trash (MESSAGES 0 RECENT 0 UNSEEN 0 UIDNEXT 14000 UIDVALIDITY 647162424)
S: 9 OK STATUS Completed
>> Command 9 took 0.1127 seconds.
S: * STATUS Spam? (MESSAGES 1 RECENT 0 UNSEEN 0 UIDNEXT 4 UIDVALIDITY 647162425)
S: 10 OK STATUS Completed
>> Command 10 took 0.1127 seconds.
S: * STATUS Protonmail (MESSAGES 26668 RECENT 0 UNSEEN 0 UIDNEXT 40667 UIDVALIDITY 647338195)
S: 11 OK STATUS Completed
>> Command 11 took 0.1205 seconds.
C: 12 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 12 OK LOGOUT Completed
>> Command 12 took 0.0228 seconds.
------------------------------
>> Tue, 18 Feb 2025 22:50:21 +0000
>> Connection to: imap://imap.mailfence.com:993/
>> Server connection took 0.1156 seconds.
S: * OK IMAP4rev1 Service Ready
C: 1 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR CLIENTID
S: 1 OK CAPABILITY Completed
>> Command 1 took 0.0251 seconds.
C: 2 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [[REDACTED]])]
S: * CAPABILITY IMAP4 IMAP4rev1 NAMESPACE QUOTA MOVE UIDPLUS UNSELECT IDLE AUTH=PLAIN SASL-IR APPENDLIMIT=50000000
S: 2 OK Authenticate completed
>> Command 2 took 0.3864 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 3 STATUS "Sent Items" (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS "Sent Items" (MESSAGES 11 UIDNEXT 12 UIDVALIDITY 647162422)
S: 3 OK STATUS Completed
>> Command 3 took 0.0399 seconds.
C: 4 STATUS "Sent Items" (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS "Sent Items" (MESSAGES 11 UIDNEXT 12 UIDVALIDITY 647162422)
S: 4 OK STATUS Completed
>> Command 4 took 0.0377 seconds.
C: 5 STATUS "Sent Items" (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS "Sent Items" (MESSAGES 11 UIDNEXT 12 UIDVALIDITY 647162422)
S: 5 OK STATUS Completed
>> Command 5 took 0.0375 seconds.
C: 6 EXAMINE "Sent Items"
S: * 11 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162422]
S: * OK [UIDNEXT 12]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 6 OK [READ-ONLY] EXAMINE Completed
>> Command 6 took 0.0373 seconds.
C: 7 UID FETCH 1:11 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 7 OK FETCH Completed
>> Command 7 took 0.0842 seconds.
>> CACHE: Stored messages [Sent Items; 1:11]
C: 8 SELECT "Sent Items"
S: * 11 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162422]
S: * OK [UIDNEXT 12]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 8 OK [READ-WRITE] SELECT Completed
>> Command 8 took 0.037 seconds.
C: 9 UID SEARCH UID 8,7,6,10:11,9,5,4,3,2,1
S: * SEARCH 1 2 3 4 5 6 7 8 9 10 11
S: 9 OK SEARCH completed
>> Command 9 took 0.026 seconds.
C: 10 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 10 OK STATUS Completed
>> Command 10 took 0.0341 seconds.
C: 11 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 11 OK STATUS Completed
>> Command 11 took 0.0318 seconds.
C: 12 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY)
S: * STATUS INBOX (MESSAGES 12 UIDNEXT 14 UIDVALIDITY 647162421)
S: 12 OK STATUS Completed
>> Command 12 took 0.0318 seconds.
C: 13 EXAMINE INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Draft \Flagged)
S: * OK [PERMANENTFLAGS ()]
S: 13 OK [READ-ONLY] EXAMINE Completed
>> Command 13 took 0.0489 seconds.
C: 14 UID FETCH 2:13 (ENVELOPE FLAGS INTERNALDATE BODY.PEEK[HEADER])
[[REDACTED]]
S: 14 OK FETCH Completed
>> Command 14 took 0.0679 seconds.
>> CACHE: Stored messages [INBOX; 2:13]
C: 15 SELECT INBOX
S: * 12 EXISTS
S: * 0 RECENT
S: * OK [UIDVALIDITY 647162421]
S: * OK [UIDNEXT 14]
S: * FLAGS (\Deleted \Seen \Answered \Recent \Draft)
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)]
S: 15 OK [READ-WRITE] SELECT Completed
>> Command 15 took 0.0335 seconds.
C: 16 UID SEARCH UID 10,9,8,7,6,5,4,3,2,11,13,12
S: * SEARCH 2 3 4 5 6 7 8 9 10 11 12 13
S: 16 OK SEARCH completed
>> Command 16 took 0.027 seconds.
C: 17 LOGOUT
S: * BYE ContactOffice IMAP4rev1 Server logging out
S: 17 OK LOGOUT Completed
>> Command 17 took 0.0261 seconds.
Hi @Trivernis
Looks like your system is accessing your mail server properly
S: * STATUS "Sent Items" (MESSAGES 11 RECENT 0 UNSEEN 0 UIDNEXT 12 UIDVALIDITY 647162422)
S: 8 OK STATUS Completed
So lets move on to the nextcloud log are there any errors in the log?
Hi. Not to hijack the thread, but it seems i experience the same issue, so I'd rather not duplicate the issue.
I can access the following inboxes:
- "Inbox"
- Favorites
- Sent
All others fail with "Could not open mailbox". Interestingly, i can see my "Junk" folder with a count of 63, but it cannot load.
This happens to other users as well.
Running Nextcloud AIO:
- Nextcloud Hub 10 (31.0.2 RC1)
- Nextcloud Mail 5.0.3
The mail server is Mailcow running the latest version. AFAIK there is no issues with this installation at all. I tried digging deep in ALL my logs, and the most useful thing i found, is that it doesn't seem to sync these inboxes.
horde_imap.log
This is a smaller snippet, but everything indicates that it works. I watched it for a long time trying to access the inbox and see if anything useful was logged. It was not.
sudo docker exec --user www-data -it nextcloud-aio-nextcloud tail -f /mnt/ncdata/horde_imap.log
C: 6 SEARCH RETURN (MIN COUNT) UNSEEN
S: * ESEARCH (TAG "6") MIN 2070 COUNT 15414
S: 6 OK Search completed (0.005 + 0.000 + 0.004 secs).
>> Command 6 took 0.0046 seconds.
>> CACHE: Stored metadata (_m,_s,_i [INBOX])
>> SEARCH: Saved search to cache (c95c5b383c5ae4cb27712d48f6c8860a [INBOX])
C: 7 LOGOUT
S: * BYE Logging out
S: 7 OK Logout completed (0.001 + 0.000 secs).
>> Command 7 took 0.0006 seconds.
------------------------------
>> Wed, 30 Apr 2025 17:19:38 +0000
>> Connection to: imap://mail.REDACTED.COM:993/
>> Server connection took 0.0241 seconds.
S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
C: 1 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [email protected])]
S: 1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY METADATA SPECIAL-USE COMPRESS=DEFLATE QUOTA ACL RIGHTS=texk] Logged in
>> Command 1 took 0.0082 seconds.
>> CACHE: Using the OCA\Mail\Cache\Cache storage driver.
C: 2 ENABLE QRESYNC
C: 3 STATUS INBOX (MESSAGES UIDNEXT UIDVALIDITY HIGHESTMODSEQ)
S: * ENABLED QRESYNC
S: 2 OK Enabled (0.001 + 0.000 secs).
>> Command 2 took 0.0008 seconds.
S: * STATUS INBOX (MESSAGES 22740 UIDNEXT 23121 UIDVALIDITY 1731843398 HIGHESTMODSEQ 24081)
S: 3 OK Status completed (0.002 + 0.000 + 0.001 secs).
>> Command 3 took 0.0017 seconds.
C: 4 EXAMINE INBOX (QRESYNC (1731843398 24081 1:3834,3836:20137,20140,20162:20175,20177:20182,20184:20427,20429:20644,20646:20659,20661:20672,20674:20681,20683:20694,20696:20701,20703:20712,20714:20723,20725:20730,20738:20739,20741:20756,20758:20764,20766:20773,20775:20780,20782:20785,20787:20797,20799:20811,20813:20824,20826:20837,20839:20848,20850:20856,20858:20867,20869:20875,20877:20882,20884:20887,20890:20891,20893:20930,20935:21037,21039:21100,21102:21252,21254:21265,21267:21305,21312:21319,21326:21339,21346:21356,21363:21372,21379:21387,21392,21395:21408,21415:21425,21429:21447,21453:21459,21465:21473,21479:21483,21489:21495,21501,21503:21504,21506:21509,21515:21519,21526:21530,21532:21535,21542:21547,21554:21639,21641:21655,21669,21671,21676,21690:21696,21698:21735,21737:21741,21743:21775,21777:21802,21804:21829,21831:21851,21853:21869,21871:21888,21890:21906,21908:21918,21920:21923,21925:21934,21936:21943,21945:21956,21958:21978,21980:21987,21989:21997,21999:22008,22010:22024,22026:22029,22031:22045,22047:22063,22065:22081,22083:22088,22090:22096,22098:22108,22110:22114,22116:22125,22127:22137,22139:22163,22165:22202,22204:22217,22219:22228,22230:22248,22250:22259,22261:22271,22273:22274,22276:22313,22315:22318,22320,22324:22336,22338:22341,22343:22383,22385:22398,22400:22406,22408:22409,22411:22414,22416:22425,22428:22468,22471:22475,22480:22481,22487:22488,22490,22494:22495,22497,22499:22523,22525:22527,22529:22531,22533:22544,22554,22556,22582,22585,22587,22594:22616,22618:22623,22627:22649,22651:22671,22678,22680:22681,22686,22691,22710,22712:22763,22765,22767:22775,22777:22807,22809:22826,22828:22852,22854,22856:22868,22872:22907,22909:22972,22975:22993,22995:22996,22998:23001,23003,23005:23007,23009:23011,23013:23025,23027:23033,23035:23036,23038:23063,23071:23120))
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded $label1 paperless_processed)
S: * OK [PERMANENTFLAGS ()] Read-only mailbox.
S: * 22740 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 2070] First unseen.
S: * OK [UIDVALIDITY 1731843398] UIDs valid
S: * OK [UIDNEXT 23121] Predicted next UID
S: * OK [HIGHESTMODSEQ 24081] Highest
S: 4 OK [READ-ONLY] Examine completed (0.001 + 0.000 secs).
>> Command 4 took 0.0017 seconds.
C: 5 SELECT INBOX (QRESYNC (1731843398 24081 1:3834,3836:20137,20140,20162:20175,20177:20182,20184:20427,20429:20644,20646:20659,20661:20672,20674:20681,20683:20694,20696:20701,20703:20712,20714:20723,20725:20730,20738:20739,20741:20756,20758:20764,20766:20773,20775:20780,20782:20785,20787:20797,20799:20811,20813:20824,20826:20837,20839:20848,20850:20856,20858:20867,20869:20875,20877:20882,20884:20887,20890:20891,20893:20930,20935:21037,21039:21100,21102:21252,21254:21265,21267:21305,21312:21319,21326:21339,21346:21356,21363:21372,21379:21387,21392,21395:21408,21415:21425,21429:21447,21453:21459,21465:21473,21479:21483,21489:21495,21501,21503:21504,21506:21509,21515:21519,21526:21530,21532:21535,21542:21547,21554:21639,21641:21655,21669,21671,21676,21690:21696,21698:21735,21737:21741,21743:21775,21777:21802,21804:21829,21831:21851,21853:21869,21871:21888,21890:21906,21908:21918,21920:21923,21925:21934,21936:21943,21945:21956,21958:21978,21980:21987,21989:21997,21999:22008,22010:22024,22026:22029,22031:22045,22047:22063,22065:22081,22083:22088,22090:22096,22098:22108,22110:22114,22116:22125,22127:22137,22139:22163,22165:22202,22204:22217,22219:22228,22230:22248,22250:22259,22261:22271,22273:22274,22276:22313,22315:22318,22320,22324:22336,22338:22341,22343:22383,22385:22398,22400:22406,22408:22409,22411:22414,22416:22425,22428:22468,22471:22475,22480:22481,22487:22488,22490,22494:22495,22497,22499:22523,22525:22527,22529:22531,22533:22544,22554,22556,22582,22585,22587,22594:22616,22618:22623,22627:22649,22651:22671,22678,22680:22681,22686,22691,22710,22712:22763,22765,22767:22775,22777:22807,22809:22826,22828:22852,22854,22856:22868,22872:22907,22909:22972,22975:22993,22995:22996,22998:23001,23003,23005:23007,23009:23011,23013:23025,23027:23033,23035:23036,23038:23063,23071:23120))
S: * OK [CLOSED] Previous mailbox closed.
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded $label1 paperless_processed)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded $label1 paperless_processed \*)] Flags permitted.
S: * 22740 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 2070] First unseen.
S: * OK [UIDVALIDITY 1731843398] UIDs valid
S: * OK [UIDNEXT 23121] Predicted next UID
S: * OK [HIGHESTMODSEQ 24081] Highest
S: 5 OK [READ-WRITE] Select completed (0.001 + 0.000 secs).
>> Command 5 took 0.0015 seconds.
>> SEARCH: Expired from cache [INBOX]
C: 6 SEARCH RETURN (MIN COUNT) UNSEEN
S: * ESEARCH (TAG "6") MIN 2070 COUNT 15414
S: 6 OK Search completed (0.005 + 0.000 + 0.004 secs).
>> Command 6 took 0.0048 seconds.
>> CACHE: Stored metadata (_m,_s,_i [INBOX])
>> SEARCH: Saved search to cache (c95c5b383c5ae4cb27712d48f6c8860a [INBOX])
C: 7 LOGOUT
S: * BYE Logging out
S: 7 OK Logout completed (0.001 + 0.000 secs).
>> Command 7 took 0.0006 seconds.
Verbose sync: I also tried a sync. Interestingly, there seems to be some mailboxes which are skipped? These id's seem to be the same that in the webui gets the "Could not open mailbox" error (Looking at the ID in the URL). It seems to me that the reason that they fail to open, is because they don't get synced. But why they don't get synced, i cannot seem to figure out from the logs.
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php -f occ mail:account:sync -vvv 5
[debug] account is up to date, skipping mailbox sync
[debug] Skipping mailbox sync for 138
[debug] Skipping mailbox sync for 142
[debug] Skipping mailbox sync for 133
[debug] Skipping mailbox sync for 139
[debug] Syncing 131
[debug] Locking mailbox 131 for new messages sync
[debug] Locking mailbox 131 for changed messages sync
[debug] Locking mailbox 131 for vanished messages sync
[debug] Running partial sync for 131
[debug] partial sync 5:Sent - get all known UIDs took 0s. 50/51MB memory used
[debug] partial sync 5:Sent - get new messages via Horde took 10s. 56/61MB memory used
[debug] partial sync 5:Sent - persist new messages took 0s. 56/61MB memory used
[debug] partial sync 5:Sent - get changed messages via Horde took 0s. 56/61MB memory used
[debug] partial sync 5:Sent - persist changed messages took 0s. 56/61MB memory used
[debug] partial sync 5:Sent - get vanished messages via Horde took 0s. 56/61MB memory used
[debug] partial sync 5:Sent - delete vanished messages took 0s. 56/61MB memory used
[debug] partial sync 5:Sent took 10s
[debug] Unlocking mailbox 131 from vanished messages sync
[debug] Unlocking mailbox 131 from changed messages sync
[debug] Unlocking mailbox 131 from new messages sync
[debug] Skipping mailbox sync for 134
[debug] Skipping mailbox sync for 141
[debug] Skipping mailbox sync for 130
[debug] Skipping mailbox sync for 140
[debug] Skipping mailbox sync for 135
[debug] Skipping mailbox sync for 132
[debug] Skipping mailbox sync for 136
[debug] Skipping mailbox sync for 143
[debug] Skipping mailbox sync for 137
[debug] Syncing 145
[debug] Locking mailbox 145 for new messages sync
[debug] Locking mailbox 145 for changed messages sync
[debug] Locking mailbox 145 for vanished messages sync
[debug] Running partial sync for 145
[debug] partial sync 5:INBOX - get all known UIDs took 0s. 56/65MB memory used
[debug] partial sync 5:INBOX - get new messages via Horde took 114s. 157/353MB memory used
[debug] partial sync 5:INBOX - persist new messages took 0s. 157/353MB memory used
[debug] partial sync 5:INBOX - get changed messages via Horde took 0s. 157/353MB memory used
[debug] partial sync 5:INBOX - persist changed messages took 3s. 156/353MB memory used
[debug] partial sync 5:INBOX - get vanished messages via Horde took 0s. 156/353MB memory used
[debug] partial sync 5:INBOX - delete vanished messages took 0s. 156/353MB memory used
[debug] partial sync 5:INBOX took 117s
[debug] Unlocking mailbox 145 from vanished messages sync
[debug] Unlocking mailbox 145 from changed messages sync
[debug] Unlocking mailbox 145 from new messages sync
[debug] Building threads for account 5
[debug] Account 5 has 2299 messages with threading information
[debug] Threading 2299 messages - build ID table took 0s. 159/353MB memory used
[debug] Threading 2299 messages - build root container took 0s. 159/353MB memory used
[debug] Threading 2299 messages - free ID table took 0s. 159/353MB memory used
[debug] Threading 2299 messages - prune containers took 0s. 159/353MB memory used
[debug] Threading 2299 messages - group by subject took 0s. 159/353MB memory used
[debug] Threading 2299 messages took 0s
[debug] Account 5 has 1138 threads
[debug] Account 5 has 0 messages with a new thread IDs
352MB of memory used
nextcloud.log:
Theres a couple of exceptions in the nextcloud.log which mostly reads dirty table reads, but the id's don't match the ones which cannot sync. Below are some cherry picked entries
{"reqId":"3yWoiSrmyBQNILRd2aGc","level":0,"time":"2025-04-30T17:29:00+00:00","remoteAddr":"185.107.13.1","user":"714da538-b96a-4c2d-ba2d-5617991ff024","app":"no app in context","method":"POST","url":"/apps/mail/api/mailboxes/122/sync","message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","version":"31.0.2.0","exception":{"Exception":"Exception","Message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":50,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)",{"dcValue1":4,"dcValue2":"7e33429f656f1e6e9d79b29c3f82c57e"},{"dcValue1":2,"dcValue2":2}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":289,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)",{"dcValue1":4,"dcValue2":"7e33429f656f1e6e9d79b29c3f82c57e"},{"dcValue1":2,"dcValue2":2}]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":269,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":375,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/mail/lib/Db/MailboxMapper.php","line":83,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/mail/lib/Cache/Cache.php","line":64,"function":"find","class":"OCA\\Mail\\Db\\MailboxMapper","type":"->","args":["*** sensitive parameters replaced ***","INBOX"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Cache.php","line":110,"function":"getCachedUids","class":"OCA\\Mail\\Cache\\Cache","type":"->","args":["INBOX","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":1182,"function":"get","class":"Horde_Imap_Client_Cache","type":"->","args":["INBOX"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1066,"function":"_openMailbox","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***",1]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1701,"function":"openMailbox","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Data/Sync.php","line":199,"function":"status","class":"Horde_Imap_Client_Base","type":"->","args":[["*** sensitive parameters replaced ***"],19456]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":3643,"function":"__construct","class":"Horde_Imap_Client_Data_Sync","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"U":"6312","V":"1731853352","H":"9261"},{"U":6312,"V":1731853352,"H":9261},64,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/Sync/Synchronizer.php","line":99,"function":"sync","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/Sync/Synchronizer.php","line":69,"function":"doCombinedSync","class":"OCA\\Mail\\IMAP\\Sync\\Synchronizer","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":401,"function":"sync","class":"OCA\\Mail\\IMAP\\Sync\\Synchronizer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":263,"function":"runPartialSync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php","line":126,"function":"sync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/MailboxesController.php","line":144,"function":"syncMailbox","class":"OCA\\Mail\\Service\\Sync\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"sync","class":"OCA\\Mail\\Controller\\MailboxesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\MailboxesController"},"sync"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\MailboxesController"},"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\MailboxesController","sync",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"122","_route":"mail.mailboxes.sync"}]},{"file":"/var/www/html/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/mailboxes/122/sync"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":406,"message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","tables":["oc_authtoken","oc_mail_mailboxes"],"reads":["oc_mail_mailboxes"],"exception":{},"CustomMessage":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)"}}
And
{"reqId":"jreuD1k0ngeU2MmATZVL","level":0,"time":"2025-04-30T17:29:28+00:00","remoteAddr":"192.168.0.183","user":"REDACTED_USER","app":"no app in context","method":"POST","url":"/apps/mail/api/mailboxes/145/sync","message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0","version":"31.0.2.0","exception":{"Exception":"Exception","Message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","Code":0,"Trace":[{"file":"/var/www/html/lib/private/DB/ConnectionAdapter.php","line":50,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)",{"dcValue1":5,"dcValue2":"7e33429f656f1e6e9d79b29c3f82c57e"},{"dcValue1":2,"dcValue2":2}]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":289,"function":"executeQuery","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)",{"dcValue1":5,"dcValue2":"7e33429f656f1e6e9d79b29c3f82c57e"},{"dcValue1":2,"dcValue2":2}]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":269,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":375,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/mail/lib/Db/MailboxMapper.php","line":83,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/mail/lib/Cache/Cache.php","line":85,"function":"find","class":"OCA\\Mail\\Db\\MailboxMapper","type":"->","args":["*** sensitive parameters replaced ***","INBOX"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Cache.php","line":172,"function":"getMetaData","class":"OCA\\Mail\\Cache\\Cache","type":"->","args":["INBOX","*** sensitive parameters replaced ***",["_m","uidvalid"]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":1178,"function":"getMetaData","class":"Horde_Imap_Client_Cache","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",["_m","uidvalid"]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1066,"function":"_openMailbox","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***",1]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1701,"function":"openMailbox","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Data/Sync.php","line":199,"function":"status","class":"Horde_Imap_Client_Base","type":"->","args":[["*** sensitive parameters replaced ***"],19456]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":3643,"function":"__construct","class":"Horde_Imap_Client_Data_Sync","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"U":"23121","V":"1731843398","H":"24081"},{"U":23121,"V":1731843398,"H":24081},64,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/Sync/Synchronizer.php","line":99,"function":"sync","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/Sync/Synchronizer.php","line":69,"function":"doCombinedSync","class":"OCA\\Mail\\IMAP\\Sync\\Synchronizer","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":401,"function":"sync","class":"OCA\\Mail\\IMAP\\Sync\\Synchronizer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/ImapToDbSynchronizer.php","line":263,"function":"runPartialSync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/Sync/SyncService.php","line":126,"function":"sync","class":"OCA\\Mail\\Service\\Sync\\ImapToDbSynchronizer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/MailboxesController.php","line":144,"function":"syncMailbox","class":"OCA\\Mail\\Service\\Sync\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"sync","class":"OCA\\Mail\\Controller\\MailboxesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\MailboxesController"},"sync"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Mail\\Controller\\MailboxesController"},"sync"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":307,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\MailboxesController","sync",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"145","_route":"mail.mailboxes.sync"}]},{"file":"/var/www/html/lib/base.php","line":1025,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/mailboxes/145/sync"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":406,"message":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)","tables":["oc_mail_mailboxes"],"reads":["oc_mail_mailboxes"],"exception":{},"CustomMessage":"dirty table reads: SELECT * FROM `*PREFIX*mail_mailboxes` WHERE (`account_id` = :dcValue1) AND (`name_hash` = :dcValue2)"}}
Thanks in advance.
@ollioddi
Thanks for the detailed message!
Nextcloud.log: You can disregard those, dirty table reads are most like not the cause.
Verbose sync: This is a very interesting thing you discovered! The definitely would cause the error on the front end, I am very curious, why those mailbox are being skipped as that is most likely the cause of this issue.
Would you be able to export the oc_mail_mailboxes table for us?
SELECT * FROM oc_mail_mailboxes WHERE id = 5
You can send it to [email protected] or post it here if you feel comfortable.
Hi @SebastianKrupinski, thanks for the very quick reply.
I figured that the nextcloud.log was irrelevant.
I attempted to export the table, but ran into some quirks. For reference, I use Authentik as SSO on my instance through the OpenID Connect user backend app, version 7.2.0.
When i run:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php -f occ mail:account:export ollioddi
Account 5:
- E-Mail: [email protected]
- Name: Oliver
- Provision: none ID: N/A
- IMAP user: [email protected]
- IMAP host: mail.redacted.com:993, security: ssl
- SMTP user: [email protected]
- SMTP host: mail.redacted.com:465, security: ssl
I then assume my ID is 5, correct?
Your query had no rows. I assume you mean account_id and not just id?
Because i use Authentik, i have found that my original Nextcloud created user has account id 1, but also 5 as i am currently logged in through it. I am not sure if this is relevant.
I ran this query, and removed irrelevant ids. As you can see, my personal inboxes are identical between the ids. As of today, i also removed the mail account and added it again to debug, so it's fresh in that sense.
nextcloud_database=> SELECT id, name, account_id FROM oc_mail_mailboxes ORDER BY id;
id | name | account_id
-----+-------------------------------------------------------+------------
1 | INBOX | 1
2 | Archive | 1
3 | Archives | 1
6 | Drafts | 1
9 | Outbox | 1
12 | Sent | 1
13 | Trash | 1
15 | Archives/2013 | 1
16 | Archives/2014 | 1
17 | Archives/REDACTED_1 | 1
18 | Archives/REDACTED_2 | 1
19 | Archives/REDACTED_3 | 1
20 | Archives/REDACTED_4 | 1
21 | Archives/REDACTED_5 | 1
130 | Junk | 5
131 | Sent | 5
132 | Outbox | 5
133 | Drafts | 5
134 | Trash | 5
135 | Archives | 5
136 | Archives/REDACTED_5 | 5
137 | Archives/REDACTED_4 | 5
138 | Archives/REDACTED_3 | 5
139 | Archives/REDACTED_2 | 5
140 | Archives/REDACTED_1 | 5
141 | Archives/2014 | 5
142 | Archives/2013 | 5
143 | Archive | 5
145 | INBOX | 5
I then executed SELECT * FROM oc_mail_mailboxes WHERE account_id = 5;
The tokens are redacted, i was unsure if it was safe to send here.
id | name | account_id | attributes | delimiter | messages | unseen | selectable | special_use | sync_new_lock | sync_changed_lock | sync_vanished_lock | sync_new_token | sync_changed_token | sync_vanished_token | sync_in_background | my_acls | shared | name_hash
-----+------------------------------------+------------+-------------------------------------------+-----------+----------+--------+------------+-------------+---------------+-------------------+--------------------+--------------------------------------+--------------------------------------+--------------------------------------+--------------------+-------------+--------+----------------------------------
138 | Archives/REDACTED_3 | 5 | ["\\subscribed","\\unmarked"] | / | 1 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 2f2256941b00dec8f74d2cda2190ec17
142 | Archives/2013 | 5 | ["\\subscribed","\\unmarked"] | / | 1 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 608a217ddd462ae5805d4d107591062c
133 | Drafts | 5 | ["\\subscribed","\\unmarked","\\drafts"] | / | 0 | 0 | t | ["drafts"] | | | | | | | f | lrwstipekxa | f | db3af42ba64b595db6ab3ea999fe0bb1
139 | Archives/REDACTED_4 | 5 | ["\\subscribed","\\unmarked"] | / | 3 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 20e0052dfa3eaa1c797baee9a593ba40
131 | Sent | 5 | ["\\subscribed","\\unmarked","\\sent"] | / | 987 | 0 | t | ["sent"] | | | | TOKEN_REDACTED(identical) | TOKEN_REDACTED(identical) | TOKEN_REDACTED(identical) | f | lrwstipekxa | f | 7f8c0283f16925caed8e632086b81b9c
134 | Trash | 5 | ["\\subscribed","\\unmarked","\\trash"] | / | 264 | 52 | t | ["trash"] | | | | | | | f | lrwstipekxa | f | a7e253cd8dd95da3e20daf45519a8dc2
141 | Archives/2014 | 5 | ["\\subscribed","\\unmarked"] | / | 1 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | c8eb4af3db0ce14af825a7d77b0d0d74
130 | Junk | 5 | ["\\subscribed","\\marked","\\junk"] | / | 98 | 63 | t | ["junk"] | | | | | | | f | lrwstipekxa | f | 50a16f415160a7132a86a551fc34bdc9
140 | Archives/REDACTED_1 | 5 | ["\\subscribed","\\unmarked"] | / | 34 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 99e761d28913f057e1d83dcb47884015
135 | Archives | 5 | ["\\subscribed","\\unmarked","\\archive"] | / | 1 | 1 | t | ["archive"] | | | | | | | f | lrwstipekxa | f | 178fde647037235223ac2a188a7106b1
132 | Outbox | 5 | ["\\subscribed","\\unmarked"] | / | 0 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 7554b67fb6cb01f58c8c2bee866cceb1
136 | Archives/REDACTED_5 | 5 | ["\\subscribed","\\unmarked"] | / | 13 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 97884050fd39e98d981f93067ea3a052
143 | Archive | 5 | ["\\subscribed","\\unmarked","\\archive"] | / | 0 | 0 | t | ["archive"] | | | | | | | f | lrwstipekxa | f | e727b00944f81e1d0a95c12886ac4641
137 | Archives/REDACTED_2 | 5 | ["\\subscribed","\\unmarked"] | / | 1 | 0 | t | [] | | | | | | | f | lrwstipekxa | f | 63f3a8afdc0978981dc20108234a60f1
145 | INBOX | 5 | ["\\subscribed"] | / | 22741 | 15414 | t | ["inbox"] | | | | TOKEN_REDACTED(identical) | TOKEN_REDACTED(identical) | TOKEN_REDACTED(identical) | f | lrwstipekxa | f | 7e33429f656f1e6e9d79b29c3f82c57e
Let me know if you want me to do further. (And yes, i know i have too many unread emails :--)
Edit: it's interesting to compare with the sync logs. It exactly matches the experience in the frontend, those which are skipped fails now that I can easily compare id's and names.
Hi @ollioddi
I don't see anything out of the ordinary in the mailboxes table, so it must be something during the sync that is causing the skip.
Can you...
A. Close any instances of NC Mail so that it does not cause extra imap logs B. Delete the existing horde_imap.log C. Make sure debugging is turned on D. rerun this command -> sudo docker exec --user www-data -it nextcloud-aio-nextcloud php -f occ mail:account:sync -vvv 5
Then either post or send me the entire contents of the horde_imap.log
Hi again @SebastianKrupinski . I've sent you the log files to your email.
Theres not as much activity in the horde_imap.log as i would have been expecting.
@ollioddi
I got the log, and you are correct there is not much in it, looks like the extra mailboxes that are not syncing are not even being examined.
At this point I am a bit confused,
So,
- So you can see the mailbox in the UI?
- The mailboxes exist in the UI.
- But when you select it no messages load.
- And command line sync skips the mailboxes
- But there is no evidence of the mailbox being selected in the logs
(My notes)
@SebastianKrupinski
Thats exactly it. Also worth mentioning that other email clients can sync these folders no issue, such as K9-mail. And yes, they appear in web, just cannot load.
I'll see if I have time this weekend to setup a dev instance and inspect the logic which skips the inboxes. I think it might reveal something, but I am not familiar with the nextcloud (or apps) code. Do you agree? I've found where I believe the checks are performed to either sync or skip.
@ollioddi
That would be great if you could pin point the reason those mail boxes are being skipped.
Alternatively, if you can maybe reproduce this on a test account that you would be willing to share with us, then we would also help.
Hi there! It looks like this issue hasn’t seen much activity for a while and might need a bit more information to move forward. If we don’t hear back soon, we may close it to keep things organized. Thanks again for your contributions – we really appreciate it!
My issue seemed to have been caused by the error-pages middleware I configured in traefik that intercepted the HTTP 400 error messages {"status":"fail","data":{"message":"mailbox 36 is not cached","type":"OCA\\Mail\\Exception\\MailboxNotCachedException"}} which I understand are indicators to the frontend to explicitly sync the mailbox with a sync request.