Bug 2376

Summary: All sent messages get put in Sent folder twice
Product: Claws Mail (GTK 2) Reporter: Barry Warsaw <barry>
Component: Folders/IMAPAssignee: users
Status: RESOLVED FIXED    
Severity: normal CC: barry
Priority: P3    
Version: 3.7.8   
Hardware: PC   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/claws-mail/+bug/724416
Attachments:
Description Flags
claws-mail --debug none

Description Barry Warsaw 2011-03-01 15:47:42 UTC
From the bug task in Launchpad: https://bugs.launchpad.net/ubuntu/+source/claws-mail/+bug/724416

Claws 3.7.8 appends all message I sent to the Sent folder twice. On Maverick with 3.7.6 this does not happen, however with 3.7.8 on both Natty and Maverick, it does happen.  This is true even with a from-source build of CM 3.7.8 from upstream tarball.
Comment 1 Barry Warsaw 2011-03-01 18:56:06 UTC
It's definitely CM 3.7.8 that's adding the duplicates.  From the network log, during the sending of a single message.

(smtp dialog all the way to QUIT)
[13:48:34] IMAP4> 83 APPEND "INBOX.Sent Messages" (\Seen NonJunk) {782}
(...lots of IMAP fetching...)
[13:48:38] IMAP4> 88 APPEND "INBOX.Sent Messages" (\Seen NonJunk) {422}
Comment 2 Barry Warsaw 2011-03-01 19:00:50 UTC
Here's a link to the start of the thread in the mailing list/newsgroup:

http://article.gmane.org/gmane.mail.sylpheed.claws.general/46023
Comment 3 Colin Leroy 2011-03-01 20:00:01 UTC
Could you send a --debug log of what happens (from opening the Compose window to when the two mails are appended on the IMAP Sent folder) ?

From your network log, both mails appended are different sizes (782 and 422 bytes), that's strange, but I can't figure anything out by looking at the code. --debug would help a lot.

Thanks!
Comment 4 Barry Warsaw 2011-03-01 20:43:39 UTC
Created attachment 947 [details]
claws-mail --debug

This line caught my eye:

procmsg.c:1731:resaving clear text queued mail to sent folder

While I do sign my email, I am not encrypting it.  Maybe Claws things I am and is saving an extra clear text version when it doesn't need to?

Then again, you know Claws better than me!  Maybe that's just a red herring.

Hope the debug log helps.  I did trim or obfuscate a few minor details.
Comment 5 Michael Rasmussen 2011-03-01 20:48:35 UTC
Your queue folder exists and is writable on the server?
Comment 6 Barry Warsaw 2011-03-01 20:53:24 UTC
The queue folder is on the local file system:

#mh/LocalMail/queue

The sent and draft folders are on the server, accessible via IMAP, and they are writable.
Comment 7 Michael Rasmussen 2011-03-01 20:58:41 UTC
Could it in fact be that both Claws and the server puts a copy of the sent mail into the Sent folder?
Comment 8 Colin Leroy 2011-03-01 21:01:50 UTC
Oh; it looks a whole lot like another manifestation of bug #2325. Could you care to try and apply 3.7.8cvs7's patch ?

You can find it at: http://colino.net/claws-mail/getpatchset.php?ver=3.7.8cvs7

Thanks!
Comment 9 Barry Warsaw 2011-03-02 21:06:07 UTC
That does indeed fix the problem.  Thanks!  I'll work on getting this patch into Ubuntu and Debian.
Comment 10 Brenden Walker 2011-03-15 16:05:53 UTC
Just thought I'd mention I'm having this issue in Gentoo. with 3.7.8.  I created a local overlay with the patch although I need to create my own diff as the diff referenced in http://colino.net/claws-mail/getpatchset.php?ver=3.7.8cvs7 appears to have been for a slightly different file version.

Point is, fixed the problem for me as well.