Roundcube Community Forum

 

[SOLVED] IMAP Error: Could not save message in INBOX

Started by cl1cker, October 21, 2012, 04:54:57 PM

Previous topic - Next topic

cl1cker

When I attempt to save a sent message in INBOX, it fails with

IMAP Error: Could not save message in INBOX in /var/www/html/dmail/program/steps/mail/sendmail.inc on line 697 (POST /dmail/?_unlock=loading1350850580090&_lang=undefined?_task=mail&_action=send)

Additionally, imap_debug show no IMAP commands for the LOGIN, CAPABILITY or APPEND. If I log the messages manually, it appears as if it gets to the call to append without having logged in as the request is prepared with A0001, hence putLine returns false immediately (!fp).

A0001 APPEND INBOX (\Seen) {602}

vs 0.7.2:

A0004 APPEND INBOX (\Seen) {602+}

Saving sent messages in all other folders works because it appears folder_exists takes care of the imap connect.

Any help is much appreciated.
Thanks,
Steve


cl1cker


nulllptr

I'm using v0.8.2.

Applied the patch, the issue still occurs with courier-imap ?!

Below is the debug log, the error is the same sendmail.inc on line 697 as the original poster.

WRITE: L OK LOGIN Ok.
READ: ATOM: A0002
READ: ATOM: LSUB
READ: QUOTED_STRING:
READ: ATOM: INBOX.Sent
READ: EOL
WRITE: * LSUB (\HasNoChildren) "." "INBOX.Sent"
A0002 OK LSUB completed
READ: ATOM: A0003
READ: ATOM: LIST
READ: QUOTED_STRING:
READ: ATOM: INBOX.Sent
READ: EOL
WRITE: * LIST (\HasNoChildren) "." "INBOX.Sent"
A0003 OK LIST completed
READ: ATOM: A0004
READ: ATOM: APPEND
READ: ATOM: INBOX.Sent
READ: ATOM: \Seen
READ: RPAREN
WRITE: A0004 NO Error in IMAP command received by server.
READ: ATOM: MIME-Version:
READ: ATOM: 1.0
WRITE: MIME-Version: NO Error in IMAP command received by server.
READ: ATOM: Content-Type:
READ: ATOM: TEXT/PLAIN;
WRITE: Content-Type: NO Error in IMAP command received by server.
READ: ATOM: format=flowed
READ: EOL
WRITE: format=flowed NO Error in IMAP command received by server.
READ: ATOM: Content-Transfer-Encoding:
READ: ATOM: 7BIT
WRITE: Content-Transfer-Encoding: NO Error in IMAP command received by server.
READ: ATOM: Date:
READ: ATOM: MON,
WRITE: Date: NO Error in IMAP command received by server.
READ: ATOM: From:
READ: ATOM: [email protected]
WRITE: From: NO Error in IMAP command received by server.
READ: ATOM: To:
READ: ATOM: <[email protected]>
WRITE: To: NO Error in IMAP command received by server.
READ: ATOM: Subject:
READ: ATOM: TEST
WRITE: Subject: NO Error in IMAP command received by server.
READ: ATOM: Message-ID:
READ: ATOM: <[email protected]>
WRITE: * BYE [ALERT] Fatal error: TOO MANY CONSECUTIVE PROTOCOL VIOLATIONS:
WRITE: L OK LOGIN Ok.


Any suggestions?

alec

This log is not clear to me. Enable imap_debug in Roundcube and provide the log.

nulllptr

#5
Here you go:

imap debug:



[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0002 AUTHENTICATE PLAIN AHRlc3QxMjNAZWNsZWN0ZWNocy5jb20AdHVuYWZpc2gxMjM=
[06-Nov-2012 04:19:43 -0500]: [4B54] S: A0002 OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] LOGIN Ok.
[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0003 LSUB "" INBOX.Sent
[06-Nov-2012 04:19:43 -0500]: [4B54] S: * LSUB (\HasNoChildren) "." "INBOX.Sent"
[06-Nov-2012 04:19:43 -0500]: [4B54] S: A0003 OK LSUB completed
[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0004 LIST "" INBOX.Sent
[06-Nov-2012 04:19:43 -0500]: [4B54] S: * LIST (\HasNoChildren) "." "INBOX.Sent"
[06-Nov-2012 04:19:43 -0500]: [4B54] S: A0004 OK LIST completed
[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0005 APPEND INBOX.Sent (\Seen) {369+}
[06-Nov-2012 04:19:43 -0500]: [4B54] C: MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 06 Nov 2012 04:19:43 -0500
From: [email protected]
To: <[email protected]>
Subject: testing1
Message-ID: <[email protected]>
X-Sender: [email protected]
User-Agent: ecsfddsfa.com Webmail/0.8.2

test
[06-Nov-2012 04:19:43 -0500]: [4B54] S: A0005 NO Error in IMAP command received by server.
[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0006 LOGOUT
[06-Nov-2012 04:19:43 -0500]: [4B54] S: MIME-Version: NO Error in IMAP command received by server.



errors log:

[06-Nov-2012 04:04:24 -0500]: IMAP Error: Could not save message in INBOX.Sent in /usr/share/roundcube/program/steps/mail/sendmail.inc on line 697 (POST /rc/?_unlock=loading1352192946746&_lang=en?_task=mail&_action=send)


This occurs when saving a draft also.

alec

Quote from: nulllptr on November 06, 2012, 04:15:22 AM

[06-Nov-2012 04:19:43 -0500]: [4B54] C: A0005 APPEND INBOX.Sent (\Seen) {369+}
[06-Nov-2012 04:19:43 -0500]: [4B54] C: MIME-Version: 1.0
[06-Nov-2012 04:19:43 -0500]: [4B54] S: A0005 NO Error in IMAP command received by server.

For me it looks like Courier-IMAP bug. You did cut CAPABILITY response, but I assume there was LITERAL+ on the list. Then the APPEND command syntax is correct, but Courier fails to parse it.

alec

Ops, sorry. You didn't cut it. There's no LITERAL+ indeed. However, maybe it was there in some previous CAPABILITY response? Please, check the full log from the beginning for LITARAL+. There must be some reason why Roundcube uses it.

nulllptr

#8
Thanks, you were right.

I'm connecting thru a dovecot proxy which forwards to a courier-box w/o support for LITERAL+ option. I ended up setting up a custom imap_capability in dovecot skipping it and now it flies right thru :)

I do have imap_force_caps=true in roundcube and thought the refreshed caps list would have been effectively used, but I guess the code is not flexible enough for that yet...