GNOME Bugzilla – Bug 726728
Configure saving drafts on/off
Last modified: 2017-09-23 12:29:14 UTC
Created attachment 272411 [details] from one google mail account when creating messages in geary for my added google mail account (mail through a google apps account), i can end up with draft copies of a message which only appear in my gmail app on my phone (nexus 5). i assume it might the autosave for drafts, but if the message takes a long time before i hit send then it can generate many of these drafts. (for one message a little bit ago, i ended up with 39 drafts dispersed throughout the "conversation.") these drafts are not in any draft folder: not geary, not my gmail account (web interface), not even the gmail app. they only exist within the conversation, usually between replies. in order to delete them, i cannot bulk select them. i must edit each one and choose discard from the menu to remove them. this has only happened when i use geary. i had problems in 0.4.x. i compiled 0.5.x which still demonstrated the same behavior. i compiled the 0.6.x version hoping this matter had been resolved, but it remains. i like geary, but the clean up of these drafts gets out of hand too quickly for it to make this worth using right now. i'm attaching a few screenshots of what i end up with when this happens. i'm running fedora 20 with gnome 3.10 and all the updates for my distro. my phone is a nexus 5 running android 4.4.2 (kitkat build KOT49H) and gmail app version 4.7.2 (967015).
Created attachment 272412 [details] the other google mail account
Created attachment 272413 [details] nothing new in drafts folder
Created attachment 272414 [details] verifying the empty drafts folder despite having drafts in my conversations
> they only exist within the conversation To be clear, do you mean that they only exist within the conversation *on your phone*, not even in the conversation in gmail or in Geary? I don't have a modern android device, but in my old one, there is an option to re-sync with the server. What happens if you do that?
yes, that's correct. only in my phone's gmail app/client. i had at one point planned to do the select many and delete in the web client, but they didn't even exist in the conversation there. in my experience, refreshing my mail client did not clear the messages. i had even let it spend time overnight to clear them. they didn't go away.
There's a couple of things that would help us here. First, in your Gmail Settings under "Forwarding and POP/IMAP", there's two IMAP options that may be affecting this: "When I mark a message in IMAP as deleted:" and "When a message is marked as deleted and expunged from the last visible IMAP folder:". How do you have those configured? Second, are there any configuration settings on your Android Gmail app that might be of interest here? Anything related to Drafts, Trash, or deleting/expunging would be good to know about. Third, a network log would be helpful to see if the drafts are being trashed or not. If you could run Geary like this: $ geary --debug --log-network > geary.log Reproduce the problem, then send that file to geary@yorba.org. You'll probably want to redact the log file of usernames, passwords, and any sensitive material.
answers: 1. the defaults for both these options are chosen. in order, "auto-expunge on" and "archive the message." 2. there are no settings that effect the folder in a similar way as that of the web interface. 3. i have emailed a redacted geary.log file to the address above.
Those settings are what I use. The log file indicates the draft is properly deleted: Geary's issuing the commands, the server sends back OK for both as well as the IMAP notifications of it going away. So, I'm at a loss as to what's going on here. This is what I suspect is happening: one of Gmail's odd side-effects (from an IMAP perspective) is that if a message is deleted from Drafts, it's not actually deleted but moved to Trash. That's not true in other folders. For example, in Inbox, deleting a message merely removes it from the Inbox. It's still located in All Mail and whatever other labels you may have assigned to it. It looks to me that your mobile app is seeing these drafts in All Mail and threading them into the conversation. Alternately, the Gmail app is seeing them in the Trash and not blacklisting them. (Geary does this, for example, to prevent trashed messages from being included in a conversation.) I can't be certain, but it really sounds like a bug on your phone's client. One experiment you might try is deleting the drafts from your Trash folder (using Geary or the web interface), re-sync your client, and see if the problem persists for that conversation. If not, it sounds like the client is including trashed messages in the conversation.
I can confirm this bug (I'm using Cyanogenmod 10.1.3, Android 4.2.2). I'll try upgrading and see if it's fixed. For the moment, the workaround is entering the trash folder and manually deleting the drafts. It seems that it's an old problem: https://bugzilla.mozilla.org/show_bug.cgi?id=562748 (read comment 13) http://forums.mozillazine.org/viewtopic.php?f=31&t=2288873 http://www.macobserver.com/tmo/answers/how_to_configure_apple_mail_to_avoid_duplicate_drafts_with_gmail
BTW, the same problem occurs using Icedove/Thunderbird 24.4.0
ok, i see the drafts in the trash in all clients. (it's not possible to delete from the trash folder on the mobile gmail client...?) i guess deleting the drafts from the trash folder is the short term solution. i did test this process out in evolution using imap connections to my gmail accounts, and there are no drafts leftover in any of the folders like in geary. evolution is perhaps cleaning these up? dunno.
Looking over the comments in the other reports (esp. the Thunderbird ticket), it looks like the problem is indeed the Gmail app threading in messages stored in the Trash. It also doesn't sound like Google is going to fix that any time soon. The ticket also made an interesting discovery: if the drafts stored in the Trash are marked with the \Deleted flag (but not expunged) they won't be included in the app's conversations. That's something we could consider as well, but in my mind it's a work-around, not really the solution.
> i did test this process out in evolution using imap connections to my gmail > accounts, and there are no drafts leftover in any of the folders like in geary. > evolution is perhaps cleaning these up? dunno. I'd have to take a closer look at Evolution, but I suspect it's storing its drafts in a local folder, not the server. (When I create a draft with my version of Evolution, it does not appear on the server.) Geary doesn't have a notion of a local-only folder yet (bug #713898, bug #713581).
Just to let you know, I posted the issue on the Google product forum a week ago and got zero response: https://productforums.google.com/forum/#!category-topic/gmail/reading-and-receiving-messages/2HpQGwj9R20 What Geary probably has to do is to delete the drafts from the trash, too, when talking to Gmail.
*** Bug 713519 has been marked as a duplicate of this bug. ***
There's been a follow-up from Google: "The problem would appear to be that you are saving drafts created in your IMAP client to the server. That entails multiple copies of the message you are composing being sent to the Gmail server. These are not actually the same type of file as Gmail's "Drafts" - because they are being sent as messages by your client to your Gmail account, so they have similar characteristics to ordinary messages, and when Trashed when a message is finally sent, will appear in Trash. Why your Gmail App is including them in the conversation view when Gmail in a browser does not I can only guess, but it could possibly be related to whether or not Geary removes the Inbox label when the messages get deleted after sending. Some clients do not, and whilst in the web interface, the Trash label always takes priority over any other label a message might have, it might lead to confusion in the Gmail App. The simple answer is probably to turn off Save Drafts to Server in your email client, and just have your drafts saved locally within the client till you are ready to send. " As a temporary workaround, could you consider the idea of add a preference to disable the autosave of drafts? Maybe as an (hidden) option to set in geary.ini, so it doesn't appear on the user interface? This problem is rather annoying and it's preventing me from using Geary with a Google account.
Ok, I was getting ready to write a rather heated response, but I took the time to follow Jakob's link and see that the Google engineer did a little more homework and came to realize that the Gmail App was the problem here, not Geary (or Thunderbird, Outlook, or Apple Mail). I do think a master switch somewhere to turn this off would be useful. I'm renaming this ticket to reflect that.
Geary now has a "Save drafts" checkbox in the Accounts dialog. Hopefully this helps work around these problems. Pushed to master, commit 9741f6
Yup, it helps. Thanks!
I can reproduce this problem with 0.8.0.
This patch is merely about turning off saving drafts to workaround the problem. The real solution is for Google to fix their apps not to include messages in Trash in a conversation.
A quick comment to let you know that Google didn't fix this problem in version 5.0 of Gmail, released yesterday
Hey all, can anyone confirm if this is still a problem in Google's GMail apps? I'd like to remove the account pref if they have resolve it.