GNOME Bugzilla – Bug 741186
Re-attempt moving "Sent but not saved" messages to Sent at startup/periodically
Last modified: 2016-05-16 11:12:27 UTC
Over time I am collecting more and more messages in my outbox marked as "This message was sent successfully, but could not be saved to Sent Mail". Geary does not appear to attempt to re-save them to my Sent mailbox after that initial attempt. Regardless of why the message could not be saved in the first place, Geary should re-attempt to save them rather than just leaving them there. Some opportune times to do this would include app startup, when sending another message, or maybe periodically. This is related to #727679 (although that seems to have been co-opted by a side issue) and more tangentially to #733541.
Created attachment 292225 [details] [review] When filling postmaster queue, include all messages, not just unsent. Bug #741186. * src/engine/imap-db/outbox/smtp-outbox-folder.vala: Remove where clause from prefill query.
Created attachment 292226 [details] [review] Don't ignore sent messages in postman queue, try to save them. Bug #741186 * src/engine/imap-db/outbox/smtp-outbox-folder.vala (Geary.SmtpOutboxFolder.do_postman_async): Flag sent messages rather than skipping them, only try sending messages that are unsent, always try saving all messages, re-queue if unsent or unsaved.
Created attachment 292227 [details] [review] Prefill postman queue only after account has been opened. Bug #741186 * src/engine/imap-db/outbox/smtp-outbox-folder.vala (Geary.SmtpOutboxFolder.SmtpOutboxFolder): Prefil on account start. (Geary.SmtpOutboxFolder.do_postman_async): Split queue prefil code into new fill_outbox_queue method.
Hmm, I wasn't expecting that to attach as three separate patches. Anywho, this is a rough implementation that: 1. Fills the postman queue on account start, rather than postman startup 2. Includes all outbox messages when filling it 3. Postman processes both sent and unsent messages, and only removes messages from the queue if sent and saved (assuming if the account is not configured/able to save sent messages) With these patches, Geary will start trying to save sent messages on startup, and continue attempting to save them when saving fails after a successful send. It is a it rough around the edges for me in that when first starting Geary with sent messages in the outbox, postman spews errors until Geary picks up the fact that my mailbox delim is '.', not '/', but I don't know how to get notified of that.
These patches are a bit sketchy - they only work on Geary restart and occasionally keep on copying the message over and over, leading to many duplicates. In any case, this is basically a dupe of #727679 *** This bug has been marked as a duplicate of bug 727679 ***