After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727679 - Message marked "sent successfully, but could not be saved to Sent Mail"
Message marked "sent successfully, but could not be saved to Sent Mail"
Status: RESOLVED INCOMPLETE
Product: geary
Classification: Other
Component: outbox
0.6.x
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
: 733541 741186 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-05 19:54 UTC by Robert Bevan-Jones
Modified: 2019-01-15 05:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Massage stuck in outbox screenshot (119.61 KB, image/png)
2014-10-21 20:41 UTC, Tom Polak
Details
Mail account with the problem (73.99 KB, image/png)
2014-10-21 20:49 UTC, Tom Polak
Details
Proposed patches (18.17 KB, text/plain)
2017-07-13 14:37 UTC, Alex Henrie
Details

Description Robert Bevan-Jones 2014-04-05 19:54:58 UTC
I have a message stuck in my Geary Mail Outbox marked "This message was sent successfully, but could not be saved to Sent Mail".

I sent the same message again, just to be sure; and to get a copy into Sent Mail.

Then I tried to delete the marked-up message in my Outbox.  A pop-up appears reading "Do you want to permanently delete these messages?".  Click on Delete, but nothing happens, and message is still to be found in Outbox on re-entry to Geary.

I've only seen this happen once.

I can't easily provide an example attachment, I'm afraid.
Comment 1 André Klapper 2014-04-06 12:36:08 UTC
POP? IMAP? GMail?
Comment 2 Robert Bevan-Jones 2014-04-06 14:52:26 UTC
IMAP. ZOHO.
Comment 3 Gustavo Rubio 2014-05-20 19:02:20 UTC
I just had the same issue and it turns out to be a DNS resolution issue.

I have two different domains hosted on the same server on Dreamhost, one was setup as mail.example1.com a long ago, the other, mail.example2.com just set up yesterday.

The example2.com domain addresses will even reject the incoming email but the example1.com won't. Which leads me to think that you'll have to wait until DNS propagates properly.

In my case not only do I get the "This message was sent successfuly..." but also cannot receive yet emails on that server, sending through works fine though.

As said, both domains use the same mail server and software so I'm almost sure it is a DNS issue.

I setup both accounts and on the one I just setup yesterday I can see only this 3 folders on the tree beneath the account name:

 * Inbox
 * Outbox
 * Labels

And as for the older account I see:

 * Inbox
 * Drafts
 * Sent mail
 * Spam
 * Trash
 * Outbox
 * Labels

So maybe the sent mail folder (and all others which geary tries to use) will be available later when DNS propagates.
Comment 4 Tom Polak 2014-10-21 20:41:36 UTC
Created attachment 289074 [details]
Massage stuck in outbox screenshot
Comment 5 Tom Polak 2014-10-21 20:48:38 UTC
Hi,
I have the same problem with one of my e-mail accounts. When I send massage with larger than 5MB attachment, the mail is sent correctly (I checked that with my friend), but it's not saved to my Sent email on the server. It's stuck in outbox with sign "Massage was sent succesfully but could not be saved to Sent mail" - see attached screenshot in previous post. I can reproduce this behaviour every time.

This happens only with my active.cz domain mail address. When I try to send large files with my google account, there's no problem.

This is not a problem of the active.cz mail account. When I use other e-mail clients like Evolution or Thunderbird, even large files are saved to Sent email withou any problems. I am alos attaching my active.cz domain setup.

I am using Gear 0.8.1

Tom
Comment 6 Tom Polak 2014-10-21 20:49:39 UTC
Created attachment 289075 [details]
Mail account with the problem

This is the mail setup with the problem from previous post.
Comment 7 Jim Nelson 2014-10-28 19:21:10 UTC
Tom, I'll need to see a Geary debug log to trace the problem.  Please run Geary like this from a console:

$ geary --debug --log-network > geary.log

and reproduce the problem.  Please send the log to geary@yorba.org.
Comment 8 Tom Polak 2014-10-29 20:25:50 UTC
Hi Jim,
I sent a mail with reqired info.
Comment 9 Federico Bruni 2014-12-11 07:40:01 UTC
I think that comment 3 (by Gustavo Rubio) may shed some light on this issue.
I'm having this problem only with an account (dovecot server) where the email address domain is different from mail server domain.

Recently it's happening much more frequently. In the past it used to happen when I had some attachment, now it happens also with emails without attachments.
And the problem is that sometimes the message is not actually sent (just sent two failed messages to a list which always returns my own messages..).

Jim, I'll see if I can reproduce it and send a trace to you
Comment 10 Federico Bruni 2014-12-11 07:49:01 UTC
I take back the previous statement: the two messages were actually sent to the list, but Geary was not in sync with the server. I could see them on the inbox only after closing and restarting geary.

Not easy to reproduce.. I should always run geary with debug enabled.
Comment 11 Johny Why 2015-05-27 22:56:29 UTC
+1

Sending a large attachment (4 MB) from imap account (1and1.com), getting "message sent, but could not be saved to sent folder".
Comment 12 Michael Gratton 2016-05-16 11:10:04 UTC
*** Bug 733541 has been marked as a duplicate of this bug. ***
Comment 13 Michael Gratton 2016-05-16 11:12:27 UTC
*** Bug 741186 has been marked as a duplicate of this bug. ***
Comment 14 Michael Gratton 2016-07-01 05:24:47 UTC
There may well be a number of reasons why this could happen. I used to get it a lot on flakey wifi connections and Geary was having trouble copying it to the Sent folder on my Cyrus server because of Bug 757166.

A few of these issues have been fixed in Geary 0.11, so I'm wondering if people are still seeing this frequently when running 0.11?

In any case, Geary needs to retry the copy automatically, or else let people do it manually. Something like Bug 741186 but less hacky.
Comment 15 Federico Bruni 2016-07-01 10:05:38 UTC
Not frequently, but it happened to me few days ago. On a wired connection. Cannot remember the details of that email.

I'll report back when it occurs again
Comment 16 Ken Berland 2016-11-04 14:47:43 UTC
Just had a message stuck in the Outbox with "This message was sent successfully, but could not be saved to Sent Mail."  I quit and restarted and the message is now found in Sent Mail and cleared from the Outbox.

I have one other message that is in the "This message was sent..." state but will not resolve after stop/start.

Is there a way to resolve this issue via sqlite?
Comment 17 Michael Gratton 2016-11-15 04:47:46 UTC
(In reply to Ken Berland from comment #16)
> 
> Is there a way to resolve this issue via sqlite?

The app relies on logic stored in the executable rather than in the database to keep its various tables in sync, so you'd need to manually reproduce that all to avoid potential bugs with it in the future.

A terrible hack would be to copy and past the message into a new message, save it as a draft, then move that to your Sent folder - but unless the message is a reply to an existing message, there's no way to get that inserted into the conversation.
Comment 18 Alex Henrie 2017-07-13 14:37:36 UTC
Created attachment 355523 [details]
Proposed patches

I think I know what caused the patches from bug 741186 to generate endless copies of emails: In those patches, if the message fails to be sent, it is requeued and reprocessed (including saving a copy to Sent) over and over again. The fix is to requeue but not save to Sent if the message failed to be sent. That way, the message is saved only once.

There is an additional bug where the outbox postman fails to start when Geary starts with the error message "geary_imap_mailbox_specifier_construct_from_folder_path: assertion 'delim != NULL' failed". I added a patch to the beginning of the series that corrects this problem. I also added a patch to the end of the series that removes the nonfunctional Try Again button.

After compiling Geary with the attached patches and running it once, all of my stuck emails were rescued :-D

Michael, are these improved patches good enough for inclusion in Geary?
Comment 19 Michael Gratton 2017-10-26 07:38:43 UTC
Hey Alex, nice catches! The patches look good, thanks for fixing that logic error I made. I've pushed this to master as commit 504b1fb, and will merge it to geary-0.12 once it's had a bit of testing there and close this then.

Cheers!
Comment 20 Alex Henrie 2017-10-26 08:06:00 UTC
Thank you!
Comment 21 Anass Ahmed 2017-10-30 09:54:34 UTC
(In reply to Alex Henrie from comment #18)
> I also added a patch to the end of the series that
> removes the nonfunctional Try Again button.

Why do you want to remove the button instead of fixing its non-functionality?! I liked seeing it in the 0.12 version while trying Fedora 27 beta.

I prefer to have a manual control over things if algorithms go south!

It's better to have a fail fast approach though, to clarify with an error message whatever happened when trying to save the message to the sent mail folder.
Comment 22 Michael Gratton 2017-11-16 05:19:18 UTC
(In reply to Anass Ahmed from comment #21)

> Why do you want to remove the button instead of fixing its
> non-functionality?! I liked seeing it in the 0.12 version while trying
> Fedora 27 beta.

This patch fixes a bug that prevents Geary from attempting to automatically resolve the problem in the same way as it does when it cannot send message in the first place. You will still be informed that the problem is occurring, but now Geary just won't simply give up after one attempt.

> I prefer to have a manual control over things if algorithms go south!
> 
> It's better to have a fail fast approach though, to clarify with an error
> message whatever happened when trying to save the message to the sent mail
> folder.

This is being taken care of as part of Bug 713006, which will be landing in 0.13.
Comment 23 Michael Gratton 2017-11-16 05:20:00 UTC
This has been merged to geary-0.12, so resolving as fixed.
Comment 24 Federico Bruni 2018-01-01 15:38:13 UTC
I'm still experiencing this bug using latest master. This happens regularly since today. It might just be a temporary problem with my account server, I don't know...

Here's what happen: I send the email, I hear immediately the sound which confirms it was sent but the message remains in Outbox. Then I close Geary and start it again: the message is moved correctly from Outbox to Sent folder.
Comment 25 Federico Bruni 2018-01-03 14:53:19 UTC
Today sent mails are again saved correctly in the Sent folder.
So a temporary problem.. no idea about the cause.
Comment 26 Michael Gratton 2018-01-03 23:13:25 UTC
Okay, reopening this to track it down further. Federico, did you get a Problem Report infobar appear when the messages were remaining in the Outbox?
Comment 27 Federico Bruni 2018-01-04 07:25:30 UTC
I don't think I got a problem report 3 days ago.

Today it happened again and definitely no infobar appeared.
After quitting and restarting Geary, it's always saved correctly.
Comment 28 Michael Gratton 2018-02-05 11:44:43 UTC
Hey Federico,

Two things: can you attach a "geary -d" log of when the problem occurs? Also, can you try building the wip/789924-network-transition-redux branch and see if that helps.

Ta!
Comment 29 Federico Bruni 2018-02-05 17:16:32 UTC
I cannot reproduce it today. Just tested on master~g8a88d17e

Usually when problem occurs again, it's easy to reproduce. I'll come back here as soon as it happens.
Comment 30 Michael Gratton 2019-01-15 05:34:56 UTC
Resolving this as incomplete for the moment, please open a new issue on Gitlab with logs if it can be reproduced.