Bug 4838 - IMAP: Error when flags keywords received
Summary: IMAP: Error when flags keywords received
Status: CLOSED INVALID
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.1.1
Hardware: PC FreeBSD
: P3 minor
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2024-11-10 20:31 UTC by claws-mail@sjh.sh
Modified: 2024-11-12 17:49 UTC (History)
0 users

See Also:


Attachments

Description claws-mail@sjh.sh 2024-11-10 20:31:19 UTC
Keyword flags as documented in section 2.3.2 of the RFC trigger a parse error. (flag_keyword or flag-keyword in the ABNF depending on which RFC you're looking at).

Log snippet:
folder.c:2184:Scanning folder DOVE-Net/General for cache changes.
imap.c:4661:get_num_list
imap.c:4697:getting session...
imap.c:535:locking session 0x85b083800 (0)
imap.c:4720:get_num_list: updating num list
imap.c:3862:using separator: |
imap-thread.c:1451:imap select - begin
imap-thread.c:459:found imap 0x85afe4a00
imap-thread.c:459:found imap 0x85afe4a00
[2024-11-10 15:13:53] IMAP> 5 SELECT "DOVE-Net|General" 
[2024-11-10 14:50:07] IMAP< * FLAGS (PRIVATE \Seen PERMANENT LOCKED \Deleted ANONYMOUS KILLREAD MODERATED \Flagged REPLIED NOREPLY INTRANSIT SENT KILLSENT ARCHIVESENT HOLD CRASH IMMEDIATE DIRECT \Recent) Overkill! 
imap-thread.c:1439:imap select run - end 5
imap-thread.c:475:generic_cb
imap-thread.c:459:found imap 0x85ab71a00

** (claws-mail:24559): WARNING **: 14:50:07.549: [2024-11-10 14:50:07] IMAP error on nix.synchro.net: parse error (very probably non-RFC compliance from the server)


** (claws-mail:24559): WARNING **: 14:50:07.549: [2024-11-10 14:50:07] IMAP connection broken

imap.c:4281:select err 5

** (claws-mail:24559): WARNING **: 14:50:07.549: [2024-11-10 14:50:07] can't select folder: DOVE-Net|General

imap.c:548:unlocking session 0x85ac10800
imap.c:4730:get_num_list: got -1 msgs
folder.c:2188:Error fetching list of message numbers
Comment 1 claws-mail@sjh.sh 2024-11-10 21:05:42 UTC
Confirmed on 4.3.0 as well (git doesn't currently build on FreeBSD)

folder.c:2180:Scanning folder DOVE-Net/General for cache changes.
imap.c:4714:get_num_list
imap.c:4750:getting session...
imap.c:534:locking session 0x85dd7c800 (0)
imap.c:4773:get_num_list: updating num list
imap.c:3913:using separator: |
imap-thread.c:1449:imap select - begin
imap-thread.c:457:found imap 0x85dcf8a00
imap-thread.c:457:found imap 0x85dcf8a00
[2024-11-10 16:04:39] IMAP> 6 SELECT "DOVE-Net|General" 
[2024-11-10 16:04:40] IMAP< * FLAGS (PRIVATE \Seen PERMANENT LOCKED \Deleted ANONYMOUS KILLREAD MODERATED \Flagged REPLIED NOREPLY INTRANSIT SENT KILLSENT ARCHIVESENT HOLD CRASH IMMEDIATE DIRECT \Recent) Overkill! 
[2024-11-10 16:04:40] IMAP< * 19554 EXISTS 
[2024-11-10 16:04:40] IMAP< * 0 RECENT 
[2024-11-10 16:04:40] IMAP< * OK [UNSEEN 19554] 
[2024-11-10 16:04:40] IMAP< * OK [PERMANENTFLAGS (PRIVATE \Seen PERMANENT LOCKED \Deleted ANONYMOUS KILLREAD MODERATED \Flagged REPLIED NOREPLY INTRANSIT SENT KILLSENT ARCHIVESENT HOLD CRASH IMMEDIATE DIRECT \Recent)] Overkill! 
[2024-11-10 16:04:40] IMAP< * OK [UIDNEXT 68563] 
[2024-11-10 16:04:40] IMAP< * OK [UIDVALIDITY 0] 
[2024-11-10 16:04:40] IMAP< 6 OK [READ-WRITE] Mailbox dove-gen has been selected 
imap-thread.c:1437:imap select run - end 5
imap-thread.c:473:generic_cb
imap-thread.c:457:found imap 0x85dcf8a00

** (claws-mail:98003): WARNING **: 16:04:40.367: [2024-11-10 16:04:40] IMAP error on nix.synchro.net: parse error (very probably non-RFC compliance from the server)


** (claws-mail:98003): WARNING **: 16:04:40.367: [2024-11-10 16:04:40] IMAP connection broken

imap.c:4332:select err 5

** (claws-mail:98003): WARNING **: 16:04:40.367: [2024-11-10 16:04:40] can't select folder: DOVE-Net|General

imap.c:547:unlocking session 0x85dd7c800
imap.c:4783:get_num_list: got -1 msgs
folder.c:2184:Error fetching list of message numbers
folder.c:2070:TIMING : 13s925ms
Comment 2 claws-mail@sjh.sh 2024-11-10 21:08:27 UTC
I've enabled the guest account (user guest, password guest) on nix.synchro.net for testing with.
Comment 3 Paul 2024-11-11 13:05:42 UTC
(In reply to claws-mail@sjh.sh from comment #1)
> git doesn't currently build on FreeBSD

What's the build failure on FreeBSD?
Comment 4 claws-mail@sjh.sh 2024-11-11 18:58:43 UTC
Unexpectedly, I can't reproduce the build failure today.  Debug output from git build (4.3.0git44):

[2024-11-11 13:54:39] IMAP< Login to nix.synchro.net successful
imap.c:534:locking session 0x85c549c00 (0)
imap.c:4773:get_num_list: updating num list
imap-thread.c:865:imap list - begin
imap-thread.c:457:found imap 0x889ad6b00
imap-thread.c:457:found imap 0x889ad6b00
[2024-11-11 13:54:39] IMAP> 3 LIST "" "" 
[2024-11-11 13:54:39] IMAP< * LIST (\Noselect \HasChildren) "|" "" 
[2024-11-11 13:54:39] IMAP< 3 OK There you go. 
imap-thread.c:855:imap list run - end
imap-thread.c:473:generic_cb
imap-thread.c:457:found imap 0x889ad6b00
imap-thread.c:876:imap list - end 0x873dfa0e0
imap.c:3893:got separator: imap.c:3913:using separator: |
imap-thread.c:1449:imap select - begin
imap-thread.c:457:found imap 0x889ad6b00
imap-thread.c:457:found imap 0x889ad6b00
[2024-11-11 13:54:39] IMAP> 4 SELECT "DOVE-Net|General" 
[2024-11-11 13:54:40] IMAP< * FLAGS (PRIVATE \Seen PERMANENT LOCKED \Deleted ANONYMOUS KILLREAD MODERATED \Flagged REPLIED NOREPLY INTRANSIT SENT KILLSENT ARCHIVESENT HOLD CRASH IMMEDIATE DIRECT \Recent) Overkill! 
imap-thread.c:1437:imap select run - end 5
imap-thread.c:473:generic_cb
imap-thread.c:457:found imap 0x889ad6b00

** (claws-mail:64612): WARNING **: 13:54:40.513: [2024-11-11 13:54:40] IMAP error on nix.synchro.net: parse error (very probably non-RFC compliance from the server)


** (claws-mail:64612): WARNING **: 13:54:40.513: [2024-11-11 13:54:40] IMAP connection broken

imap.c:4332:select err 5

** (claws-mail:64612): WARNING **: 13:54:40.513: [2024-11-11 13:54:40] can't select folder: DOVE-Net|General

imap.c:547:unlocking session 0x85c549c00
imap.c:4783:get_num_list: got -1 msgs
folder.c:2184:Error fetching list of message numbers
summaryview.c:1244:TIMING : 1s357ms
summaryview.c:1394:reloading due to inconsistency
Comment 5 claws-mail@sjh.sh 2024-11-12 17:43:15 UTC
The 4rev1 and 4rev2 IMAP RFCs do not allow additional text after flag-list.  claws behaviour is correct.
Comment 6 Paul 2024-11-12 17:49:11 UTC
Thanks for following up! That's appreciated.

Note You need to log in before you can comment on or make changes to this bug.