atom feed6 messages in net.sourceforge.lists.courier-imap[Courier-imap] "max atom size too sma...
FromSent OnAttachments
Laurentiu C. Badea (L.C.)May 26, 2005 12:05 pm 
Sam VarshavchikMay 26, 2005 12:21 pm 
Laurentiu C. Badea (L.C.)May 26, 2005 12:53 pm 
Sam VarshavchikMay 26, 2005 1:41 pm 
Laurentiu C. Badea (L.C.)May 26, 2005 3:04 pm 
Sam VarshavchikMay 26, 2005 4:06 pm 
Subject:[Courier-imap] "max atom size too small" during UID FETCH w/ lots of messages
From:Laurentiu C. Badea (L.C.) (lc-c@infostreet.com)
Date:May 26, 2005 12:05:13 pm
List:net.sourceforge.lists.courier-imap

My client issues an UID FETCH followed by a list of messages. If the list is too long (not as in number of messages, but in size of the UID list string), imapd will die with

* BYE [ALERT] Fatal error: max atom size too small: Bad file descriptor

I ran an strace and noticed that this invariably happens when the size of allocated heap exceeds 16K during reading of the UID list.

My question is, is this a limitation of IMAP4 or courier-imap ? Either way, I'd appreciate any pointers how to get around this. Having fewer messages in Inbox is not a solution as I don't control what the end-users do, and 5000 mesages is not too many anyway (as UIDs progress, it takes fewer messages to reach the limit).

I am using courier-imap-4.0.3 rpm built on Fedora Core 2.

-- L.C.

PS. Some parts of the strace are below (I snipped repeated function calls):

select(1, 0xbffacb80, 0, 0, 0xbffacb70) = 1 read(0, "CMD6 UID FETCH 292744,292742,292743,2927"..., 8192) = 1460 strlen("CMD6") = 5 strncat(0xbffaccb0, 0x947b808, 16384, 0, 0) = 0xbffaccb0 realloc(0x947b808, 513) = 0x94c8ff8 [...] (more reallocs) realloc(0x9510bb0, 1537) = 0x9510bb0 time(0xbffac87c) = 1116887498 select(1, 0xbffac880, 0, 0, 0xbffac870) = 1 read(0, "2093,292094,292095,292096,292097,292098,"..., 8192) = 8192 realloc(0x9510bb0, 1793) = 0x9510bb0 [...] realloc(0x9510bb0, 9729) = 0x9510bb0 time(0xbffac87c) = 1116887501 select(1, 0xbffac880, 0, 0, 0xbffac870) = 1 read(0, "44,290512,291443,290508,291442,291441,29"..., 8192) = 8192 realloc(0x9510bb0, 9985) = 0x9510bb0 [...] realloc(0x9510bb0, 16129) = 0x9510bb0 realloc(0x9510bb0, 16385) = 0x9510bb0 strlen("* BYE [ALERT] Fatal error: ") = 27

[...] the rest just looks up errno and builds the error message. write(1, "* BYE [ALERT] Fatal error: max atom size too small: Bad file descriptor\r\n", 73) = 73 _exit(1 <unfinished ...>