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 768419 - Geary uses incorrect From address restoring a reply from a draft
Geary uses incorrect From address restoring a reply from a draft
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: composer
0.11.x
Other Linux
: Normal major
: 0.11.2
Assigned To: Michael Gratton
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-04 23:12 UTC by Artyom Aleksyuk
Modified: 2016-07-18 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mail to the mail list (2.72 KB, text/plain)
2016-07-05 02:01 UTC, Artyom Aleksyuk
  Details
Mail to a single person (3.58 KB, message/rfc822)
2016-07-05 02:03 UTC, Artyom Aleksyuk
  Details
Don't munge from header when restoring composer from a draft. (5.65 KB, patch)
2016-07-06 07:56 UTC, Michael Gratton
none Details | Review

Description Artyom Aleksyuk 2016-07-04 23:12:50 UTC
Hello. It'm using Geary 0.11.1 from Ubuntu PPA and GMail as a mail service.
Geary puts an incorrect From field when replying to all. For example, look at this mail: https://lists.zx2c4.com/pipermail/wireguard/2016-July/000098.html . It should be from Artyom (like the first message in a thread), not from Jason. It's not a Mailman bug as the mail in the Sent folder has incorrect From address too.

Steps to reproduce:
1. Open a mail from the Inbox folder and press "Reply to all"
2. Write a message, use detached view for email composer
3. Save the message as a draft (don't know if this step is necessary)
4. Open the draft, modify it
5. Press Send.
Comment 1 Michael Gratton 2016-07-05 00:33:43 UTC
Hi Artyom, thanks for taking the time to report this.

If you still have the message that you were replying to, please attach the email's source as an attachment (do a View Source from the message menu in Geary) so I can see what the headers look like?

Does this happen for all messages, just those from mailing lists, or just those from lists addressed to the list and multiple people?
Comment 2 Artyom Aleksyuk 2016-07-05 02:00:09 UTC
I've tested different scenarios. It doesn't matter if I reply to the list or to the person, also this bug happens if I reply to the single person. The only requirement for the bug reproduction is that I need to save a draft and open it again.
I've attached two mails - the original mail to the mail list and a mail to a single person. Both have an invalid address.
Comment 3 Artyom Aleksyuk 2016-07-05 02:01:36 UTC
Created attachment 330885 [details]
Mail to the mail list
Comment 4 Artyom Aleksyuk 2016-07-05 02:03:03 UTC
Created attachment 330886 [details]
Mail to a single person
Comment 5 Artyom Aleksyuk 2016-07-05 02:24:22 UTC
Another details.
1) I've looked into the draft mail source and the From address in it is correct
2) If I add a second mail account, everything starts to work correctly. If I remove the second account after that, the bug starts to reproduce again.
Comment 6 Michael Gratton 2016-07-05 04:21:44 UTC
Thanks for the extra info. So it's getting the From email address right (the part in angle brackets), but the name displayed as part of it is wrong. So somehow these are getting munged together.

It's interesting that it only happens when there is a single account - that might be a good clue.
Comment 7 Artyom Aleksyuk 2016-07-05 08:21:14 UTC
No, both address and name are wrong. Look at the X-Google-Original-From header, that's the original header that came from Geary. GMail silently fixes incorrect addresses, and other mail services may reject such emails or even add a sender to spam list. That's why I think the issue is major.
Comment 8 Michael Gratton 2016-07-06 07:56:04 UTC
Created attachment 330932 [details] [review]
Don't munge from header when restoring composer from a draft.

Possible fix for the the issue. This should apply cleanly to both master and the geary-0.11 branch.

Please try rebuilding from source with this patch applied and let me know if it fixes the issue. Thanks!
Comment 9 Artyom Aleksyuk 2016-07-06 16:29:08 UTC
Works fine now. Thank you!
Comment 10 Michael Gratton 2016-07-07 02:35:19 UTC
Great! I just pushed this to master as 6a15b0c, will cherry pick onto geary-0.11 after it gets a bit more testing.
Comment 11 Michael Gratton 2016-07-18 12:16:13 UTC
Pushed to geary-0.11 as 3b6bf426.