https://bugs.kde.org/show_bug.cgi?id=383131
Bug ID: 383131 Summary: Invalid QRESYNC parameters when selecting INBOX a second Product: trojita Version: git Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: IMAP Assignee: trojita-b...@kde.org Reporter: matth...@hazon.fr Target Milestone: --- Bug encounterd with IMAP server hosted by OVH (appears to be a dovecot instance (I can't figure the version). The scenario I can reproduce is the following: - Launch Trojita for the first time (not configured) - Entering my connection settings - Connection is fine, I accept the SSL certificate - The INBOX appears in the left panel with the right number of unread messages. - I click on the INBOX folder, the list of messages appears correctly - I select a message, the content is displayed correctly. - I select another folder then, everything seems ok, - I select INBOX again -> QRESYNC error The complete output: 1 >>> "y1 ID (\"name\" \"Trojita\" \"os\" \"Qt/5.5.1; xcb; Linux; Ubuntu 16.04.2 LTS\" \"version\" \"v0.7-260-ge745755-dirty\")" 1 >>> "y2 ENABLE QRESYNC" 1 >>> "y3 LIST \"\" \"%\" RETURN (SUBSCRIBED CHILDREN STATUS (MESSAGES UNSEEN RECENT))" 1 >>> "y4 SELECT INBOX (CONDSTORE)" 1 >>> "y5 UID SEARCH RETURN (ALL) ALL" 1 >>> "y6 FETCH 1:2818 (FLAGS)" 1 >>> "y7 UID FETCH 17,5841,5845:5848,5850:5856,5858:5865,5867:5880,5883:5906,5908:5910 (ENVELOPE INTERNALDATE BODYSTRUCTURE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (References List-Post)])" 1 >>> "y8 IDLE" 1 >>> "DONE" 1 >>> "y9 UID FETCH 5899 (BODY.PEEK[1])" 1 >>> "y10 LIST \"\" \"INBOX.%\" RETURN (SUBSCRIBED CHILDREN STATUS (MESSAGES UNSEEN RECENT))" 1 >>> "y11 UID FETCH 5906 (BODY.PEEK[1.2])" 1 >>> "y12 UID FETCH 5902 (BODY.PEEK[1] BODY.PEEK[2])" 1 >>> "y13 IDLE" 1 >>> "DONE" 1 >>> "y14 SELECT \"INBOX.Archives\" (CONDSTORE)" 1 >>> "y15 IDLE" 1 >>> "DONE" 1 >>> "y16 SELECT INBOX (QRESYNC (1412601342 12776 (1410,2115,2468,2644,2732,2776,2798,2809,2815,2818 4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)))" "y16 BAD Error in IMAP command SELECT: Invalid QRESYNC parameters" I tested the same SELECT command manually (through openssl s_client command) and got the same error. But I also tested the command with this form: SELECT INBOX (QRESYNC (1412601342 12776 4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)) and got some better result at first sight: 06 SELECT INBOX (QRESYNC (1412601342 12776 4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)) * OK [CLOSED] Previous mailbox closed. * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk $Forwarded $MDNSent) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk NonJunk $Forwarded $MDNSent \*)] Flags permitted. * 2818 EXISTS * 0 RECENT * OK [UNSEEN 1649] First unseen. * OK [UIDVALIDITY 1412601342] UIDs valid * OK [UIDNEXT 5911] Predicted next UID * OK [HIGHESTMODSEQ 12776] Highest 06 OK [READ-WRITE] Select completed. It seems the dovecot server doesn't accept the last parenthesized list if no known UIDs sequence is provided, so this won't work: SELECT INBOX (QRESYNC (1412601342 12776 (1410,2115,2468,2644,2732,2776,2798,2809,2815,2818 4220,5092,5509,5709,5805,5864,5889,5900,5906,5910))) But this will work: SELECT INBOX (QRESYNC (1412601342 12776 1:5910 (1410,2115,2468,2644,2732,2776,2798,2809,2815,2818 4220,5092,5509,5709,5805,5864,5889,5900,5906,5910))) Where 5910 = UIDNEXT - 1 Section 3.2.5.1 of the RFC 7162 states that: "If the list of known UIDs was also provided, the server should only report flag changes and expunges for the specified messages. If the client did not provide the list of UIDs, the server acts as if the client has specified "1:<maxuid>", where <maxuid> is the mailbox's UIDNEXT value minus 1. If the mailbox is empty and never had any messages in it, then lack of the list of UIDs is interpreted as an empty set of UIDs." It's not very clear what they refer by "the list of UIDs" but I assume it's for the list of known UIDs, am I right? -- You are receiving this mail because: You are watching all bug changes.