Opened 3 years ago

Closed 3 years ago

#1487900 closed Bugs (fixed)

roundcube-0.5.2 doesn't save sent messages

Reported by: stuart Owned by:
Priority: 2 Milestone: 0.6-beta
Component: Core functionality Version: 0.5.2
Severity: major Keywords:
Cc:

Description

roundcube has always worked for versions up to and including 0.5.1. Now, in 0.5.2, roundcube no longer saves sent messages to the defined Special Folder (e.g. "Sent").

The template configuration file differs only by a one-line comment, and I've manually re-run the installer in case of database schema changes.

If I revert back to 0.5.1, everything is again fine. As soon as I change to 0.5.2, sent messages aren't saved.

My IMAP server is dovecot, and this is reporting no errors in its logs. roundcube doesn't seem to be reporting anything untoward, either...

Change History (12)

comment:1 follow-up: Changed 3 years ago by alec

  • Milestone changed from later to 0.6-beta

Enable imap_debug and provide the log.

comment:2 Changed 3 years ago by stuart

I enabled IMAP logging, wrote an email with an easily-recognised title an content, and sent it... nothing in IMAP log, nothing in Sent messages.

Trying again by composing a new message, erasing the log, and then sending the message results in the following log:

[03-May-2011 20:57:30 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[03-May-2011 20:57:30 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.2 php 5.3.6-pl0-gentoo os Linux command /?_unlock=loading1304452650160)
[03-May-2011 20:57:30 +0100]: S: * ID NIL
[03-May-2011 20:57:30 +0100]: S: A0001 OK ID completed.
[03-May-2011 20:57:30 +0100]: C: A0002 AUTHENTICATE PLAIN <xxxx>=
[03-May-2011 20:57:30 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[03-May-2011 20:57:30 +0100]: C: A0003 LOGOUT
[03-May-2011 20:57:30 +0100]: S: * BYE Logging out
[03-May-2011 20:57:30 +0100]: S: A0003 OK Logout completed.
[03-May-2011 20:57:32 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[03-May-2011 20:57:32 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.2 php 5.3.6-pl0-gentoo os Linux command /?_task=mail&_mbox=INBOX&_refresh=1)
[03-May-2011 20:57:32 +0100]: S: * ID NIL
[03-May-2011 20:57:32 +0100]: S: A0001 OK ID completed.
[03-May-2011 20:57:32 +0100]: C: A0002 AUTHENTICATE PLAIN <xxxx>=
[03-May-2011 20:57:32 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[03-May-2011 20:57:32 +0100]: C: A0003 LIST (SUBSCRIBED) "" "*"
[03-May-2011 20:57:32 +0100]: S: * LIST (\Subscribed) "." "Trash"
[03-May-2011 20:57:32 +0100]: S: * LIST (\Subscribed) "." "Drafts"
[03-May-2011 20:57:32 +0100]: S: * LIST (\Subscribed) "." "Sent"
[03-May-2011 20:57:32 +0100]: S: * LIST (\Subscribed) "." "INBOX"
<etc>

... so no attempt seems to be being made via IMAP to save the sent message.

comment:3 Changed 3 years ago by stuart

roundcube-0.5.1 on the same system, same settings, etc. shows the following instead:

[03-May-2011 21:05:21 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[03-May-2011 21:05:21 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.1 php 5.3.6-pl0-gentoo os Linux command /?_unlock=loading1304453120742)
[03-May-2011 21:05:21 +0100]: S: * ID NIL
[03-May-2011 21:05:21 +0100]: S: A0001 OK ID completed.
[03-May-2011 21:05:21 +0100]: C: A0002 AUTHENTICATE PLAIN <xxxx>=
[03-May-2011 21:05:21 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[03-May-2011 21:05:21 +0100]: C: A0003 LSUB "" Sent
[03-May-2011 21:05:21 +0100]: S: * LSUB () "." "Sent"
[03-May-2011 21:05:21 +0100]: S: A0003 OK Lsub completed.
[03-May-2011 21:05:21 +0100]: C: A0004 LIST "" Sent
[03-May-2011 21:05:21 +0100]: S: * LIST (\HasNoChildren) "." "Sent"
[03-May-2011 21:05:21 +0100]: S: A0004 OK List completed.
[03-May-2011 21:05:21 +0100]: C: A0005 APPEND Sent (\Seen) {605+}
[03-May-2011 21:05:21 +0100]: C: Received: from
 <xxxx>
 by <xxxx>
 with HTTP (HTTP/1.1 POST); Tue, 03 May 2011 21:05:21 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 03 May 2011 21:05:21 +0100
From: Stuart Shelton <xxxx>
To: <xxxx>
Subject: DEBUG Test Message #3
Message-ID: <53a12964619b22ab0ba1e467a9960237@xxxx>
X-Sender: xxxx
User-Agent: Roundcube Webmail/0.5.1

 Test Body #3
[03-May-2011 21:05:22 +0100]: S: A0005 OK [APPENDUID 1225464855 1514] Append completed.
[03-May-2011 21:05:22 +0100]: C: A0006 LOGOUT
[03-May-2011 21:05:22 +0100]: S: * BYE Logging out
[03-May-2011 21:05:22 +0100]: S: A0006 OK Logout completed.
[03-May-2011 21:05:23 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[03-May-2011 21:05:23 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.1 php 5.3.6-pl0-gentoo os Linux command /?_task=mail&_mbox=INBOX&_refresh=1)
[03-May-2011 21:05:23 +0100]: S: * ID NIL
[03-May-2011 21:05:23 +0100]: S: A0001 OK ID completed.
[03-May-2011 21:05:23 +0100]: C: A0002 AUTHENTICATE PLAIN <xxxx>=
[03-May-2011 21:05:23 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[03-May-2011 21:05:23 +0100]: C: A0003 LIST (SUBSCRIBED) "" "*"
[03-May-2011 21:05:23 +0100]: S: * LIST (\Subscribed) "." "Trash"
[03-May-2011 21:05:23 +0100]: S: * LIST (\Subscribed) "." "Drafts"
[03-May-2011 21:05:23 +0100]: S: * LIST (\Subscribed) "." "Sent"
[03-May-2011 21:05:23 +0100]: S: * LIST (\Subscribed) "." "INBOX"
<etc>

comment:4 Changed 3 years ago by stuart

... so why is roundcube-0.5.2 logging in and then immediately logging out without even attempting to find a "Sent" mailbox, whereas roundcube-0.5.1 is (correctly) writing the message to the Sent folder?

comment:5 in reply to: ↑ 1 Changed 3 years ago by stuart

Replying to alec:

Enable imap_debug and provide the log.

Information provided above, just in case you don't see non-reply comments (and because I only just noticed the "Reply" button ;)

comment:6 follow-ups: Changed 3 years ago by alec

In compose window is the Sent folder selected in "Save sent message in:" select field? Is the folder selected in Special Folders section of user preferences? Provide the log from the moment when you click Compose.

comment:7 in reply to: ↑ 6 Changed 3 years ago by stuart

Replying to alec:

In compose window is the Sent folder selected in "Save sent message in:" select field? Is the folder selected in Special Folders section of user preferences? Provide the log from the moment when you click Compose.

Yes, the "Save sent message in" drop-box had "Sent" selected and yes, this is also the folder selected in Special Folders.

I'll try to get a log of everything from clicking Compose, but I seem to remember that the log was quite noisy and was still performing fetches of mailbox content. I'll confirm ASAP and include the log.

comment:8 in reply to: ↑ 6 Changed 3 years ago by stuart

Replying to alec:

In compose window is the Sent folder selected in "Save sent message in:" select field? Is the folder selected in Special Folders section of user preferences? Provide the log from the moment when you click Compose.

Okay, log from when "Compose" is clicked (with sensitive information replaced with "xxxx"):

06-May-2011 22:04:33 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[06-May-2011 22:04:33 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.2 php 5.3.6-pl0-gentoo os Linux command /?_task=mail&_action=compose&_mbox=INBOX)
[06-May-2011 22:04:33 +0100]: S: * ID NIL
[06-May-2011 22:04:33 +0100]: S: A0001 OK ID completed.
[06-May-2011 22:04:33 +0100]: C: A0002 AUTHENTICATE PLAIN xxxx=
[06-May-2011 22:04:33 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[06-May-2011 22:04:33 +0100]: C: A0003 LSUB "" Sent
[06-May-2011 22:04:33 +0100]: S: * LSUB () "." "Sent"
[06-May-2011 22:04:33 +0100]: S: A0003 OK Lsub completed.
[06-May-2011 22:04:33 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[06-May-2011 22:04:33 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.2 php 5.3.6-pl0-gentoo os Linux command /?_task=mail&_id=5712702124dc46261320d8&_action=compose)
[06-May-2011 22:04:33 +0100]: S: * ID NIL
[06-May-2011 22:04:33 +0100]: S: A0001 OK ID completed.
[06-May-2011 22:04:33 +0100]: C: A0002 AUTHENTICATE PLAIN xxxx=
[06-May-2011 22:04:33 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[06-May-2011 22:04:33 +0100]: C: A0003 LIST (SUBSCRIBED) "" "*"
[06-May-2011 22:04:33 +0100]: S: * LIST (\Subscribed) "." "Trash"
[06-May-2011 22:04:33 +0100]: S: * LIST (\Subscribed) "." "Drafts"
[06-May-2011 22:04:33 +0100]: S: * LIST (\Subscribed) "." "Sent"
[06-May-2011 22:04:33 +0100]: S: * LIST (\Subscribed) "." "INBOX"
[06-May-2011 22:04:33 +0100]: S: A0003 OK List completed.
[06-May-2011 22:04:56 +0100]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[06-May-2011 22:04:56 +0100]: C: A0001 ID (name "Roundcube Webmail" version 0.5.2 php 5.3.6-pl0-gentoo os Linux command /?_unlock=loading1304715894751)
[06-May-2011 22:04:56 +0100]: S: * ID NIL
[06-May-2011 22:04:56 +0100]: S: A0001 OK ID completed.
[06-May-2011 22:04:56 +0100]: C: A0002 AUTHENTICATE PLAIN xxxx=
[06-May-2011 22:04:56 +0100]: S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[06-May-2011 22:04:56 +0100]: C: A0003 LOGOUT
[06-May-2011 22:04:56 +0100]: S: * BYE Logging out
[06-May-2011 22:04:56 +0100]: S: A0003 OK Logout completed.

... just as before, no message in Sent items and no log from roundcube showing any attempt to save the message.

comment:9 Changed 3 years ago by alec

I've reviewed the changes in the code and I've got no idea where's the problem. What PHP version? Consider giving me access to your box. Write to alec at alec.pl.

comment:10 Changed 3 years ago by corbosman

I have the same issue in 0.5.2. Sent email is no longer being saved. I tracked the error to a local plugin using the message_outgoing_headers hook. In this plugin i use a function $rcmail->encrypt() to encrypt a string and add it as a header to the outgoing msg header.

Recently, this encrypt() function added the following code:

    if (is_object($this->imap))
      $this->imap->close();

This closes the imap session. Later, when RC wants to save the msg in the Sent folder the following code is triggered, causing RC to fail to find the Sent folder as an existing folder:

    function putLineC($string, $endln=true)
    {
        if (!$this->fp)
            return false;

Feedback requested on how to fix this problem.

comment:11 Changed 3 years ago by corbosman

Btw, my log_sender plugin would cause this issue right now, so if you're using that plugin, you could disable it to probably fix your problem. Still wondering why the imap session is suddenly closed in encrypt() and how else I could then encrypt a string for using in message headers.

comment:12 Changed 3 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r4779/svn. It was caused by invalid patch application.

Note: See TracTickets for help on using tickets.