[Dovecot] Out of Quota Causing "BYE Too many invalid IMAP commands."
Doing some testing in Squirrelmail, with quotas, and basically opening a message, and saving it as a draft, over and over until I run at of quota.
This is what I get when I try and save a message that is larger than the size left
May 30 19:36:36 mafeking dovecot: IMAP(joeblogs): Disconnected: Too many invalid IMAP commands.
and in SM ERROR: IMAP server closed the connection. Server responded:* BYE Too many invalid IMAP commands.
I would expect something a little more user friendly in that situation. I haven't worked out how to debug the IMAP session in SM, or how to run an IMAP session with logging. I may get around to setting up debug in dovecot to see what happens.
I'm running dovecot beta8.
Any suggestions as to how to make it 'die' nicer?
Thanks
Tim
Linux Counter user #273956
On Tue, 2006-05-30 at 11:20 +0000, Timothy White wrote:
This is what I get when I try and save a message that is larger than the size left
May 30 19:36:36 mafeking dovecot: IMAP(joeblogs): Disconnected: Too many invalid IMAP commands.
I think this means that Squirrelmail just sent the message anyway even after Dovecot replied to APPEND command with "NO Quota exceeded". So I'd say this is a Squirrelmail bug. If Squirrelmail insists on sending the message anyway, it should use LITERAL+ extension and this won't be a problem.
On 5/30/06, Timo Sirainen tss@iki.fi wrote:
On Tue, 2006-05-30 at 11:20 +0000, Timothy White wrote:
This is what I get when I try and save a message that is larger than the size left
May 30 19:36:36 mafeking dovecot: IMAP(joeblogs): Disconnected: Too many invalid IMAP commands.
I think this means that Squirrelmail just sent the message anyway even after Dovecot replied to APPEND command with "NO Quota exceeded". So I'd say this is a Squirrelmail bug. If Squirrelmail insists on sending the message anyway, it should use LITERAL+ extension and this won't be a problem.
Not fully understanding the IMAP protocole. How should the LITERAL+ extension help? If the APPEND is going to exceed quota, then how can SM still send the message? (Save as Draft)?
I'm going to try and get a debug session, to see what really is happening, so I can file a bug to SM.
Thanks
Tim
Linux Counter user #273956
On Tue, 2006-05-30 at 12:13 +0000, Timothy White wrote:
On 5/30/06, Timo Sirainen tss@iki.fi wrote:
On Tue, 2006-05-30 at 11:20 +0000, Timothy White wrote:
This is what I get when I try and save a message that is larger than the size left
May 30 19:36:36 mafeking dovecot: IMAP(joeblogs): Disconnected: Too many invalid IMAP commands.
I think this means that Squirrelmail just sent the message anyway even after Dovecot replied to APPEND command with "NO Quota exceeded". So I'd say this is a Squirrelmail bug. If Squirrelmail insists on sending the message anyway, it should use LITERAL+ extension and this won't be a problem.
Not fully understanding the IMAP protocole. How should the LITERAL+ extension help? If the APPEND is going to exceed quota, then how can SM still send the message? (Save as Draft)?
A working APPEND goes like this:
C: 1 APPEND "Drafts" {1000}
S: + OK
C:
In out-of-quota situations Squirrelmail probably does this:
C: 1 APPEND "Drafts" {1000}
S: 1 NO Quota exceeded
C:
With literal+ this happens:
C: 1 APPEND "Drafts" {1000+}
C:
So the literal+ allows client to send the data without actually waiting to see if server replies with "+" or "NO".
Timothy White wrote:
I think this means that Squirrelmail just sent the message anyway even after Dovecot replied to APPEND command with "NO Quota exceeded". So I'd say this is a Squirrelmail bug. If Squirrelmail insists on sending the message anyway, it should use LITERAL+ extension and this won't be a problem.
Not fully understanding the IMAP protocole. How should the LITERAL+ extension help? If the APPEND is going to exceed quota, then how can SM still send the message? (Save as Draft)?
If SM uses the "traditional" IMAP4rev1 mechanism, it sends something like "tag APPEND mailbox {size-of-message}\r\n" and waits for server's "+OK feel free to send me the data\r\n", but it receives "tag NO I'm not interested in your junk\r\n". At this point Dovecot properly expects another IMAP command while SM ignores the standard and sends the actual message, however Dovecot correctly parses it as an IMAP command.
The LITERAL+ extension (among other things) forces the server to actually receive the data, regardless if it wants to process them or discard them.
HTH, -jkt
-- cd /local/pub && more beer > /dev/mouth
On 5/30/06, Jan Kundrát jkt@gentoo.org wrote:
Timothy White wrote:
I think this means that Squirrelmail just sent the message anyway even after Dovecot replied to APPEND command with "NO Quota exceeded". So I'd say this is a Squirrelmail bug. If Squirrelmail insists on sending the message anyway, it should use LITERAL+ extension and this won't be a problem.
Not fully understanding the IMAP protocole. How should the LITERAL+ extension help? If the APPEND is going to exceed quota, then how can SM still send the message? (Save as Draft)?
If SM uses the "traditional" IMAP4rev1 mechanism, it sends something like "tag APPEND mailbox {size-of-message}\r\n" and waits for server's "+OK feel free to send me the data\r\n", but it receives "tag NO I'm not interested in your junk\r\n". At this point Dovecot properly expects another IMAP command while SM ignores the standard and sends the actual message, however Dovecot correctly parses it as an IMAP command.
The LITERAL+ extension (among other things) forces the server to actually receive the data, regardless if it wants to process them or discard them.
Ok, I understand the LITERAL+ better now.
from the rawlogs, I have got the following
A002 LIST "" "Drafts" A003 APPEND "Drafts" (\Seen) {1158269} Received: from 220.235.130.138
S: * OK [RAWLOG TIMESTAMP] 2006-05-30 20:55:33 C: A002 LIST "" "Drafts" S: * LIST (\HasNoChildren) "/" "Drafts" S: A002 OK List completed. C: A003 APPEND "Drafts" (\Seen) {1158269} C: Received: from 220.235.130.138 C: ... S: A003 NO Quota exceeded S: Received: BAD Error in IMAP command FROM: Unknown command. S:....
(Due to IMAP style, I can't determine exactly what order of things, as I'm taking these from the rawlogs)
So yes, that shows the SM isn't playing right.
/me goes to file a bug.
Thanks
Tim
Linux Counter user #273956
participants (4)
-
Jan Kundrát
-
Timo Sirainen
-
Timothy White
-
Timothy White