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 588833 - Improve account selection heuristics for replies
Improve account selection heuristics for replies
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.28.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[composer]
: 564696 597442 597592 603398 606226 606967 609341 609951 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-17 05:22 UTC by Alexey A Kostyuk
Modified: 2010-05-29 09:30 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Alexey A Kostyuk 2009-07-17 05:22:03 UTC
I use several mail accounts in Evolution. For example:
first:  foo1@bar.com (default)
second: foo2@bar.com
third:  foo3@bar.com

When I get email for second account - foo2@bar.com I click reply button, but "From" field is the default mail account - foo1@bar.com.
Is it possible to make the "From" field automatic select of the desired mail account for which this email (foo2@bar.com in our example).
Comment 1 Matthew Barnes 2009-08-03 23:48:20 UTC
This seems to be working as you suggested using Evolution 2.27.5.

Can you retest with the latest release?
Comment 2 Alexey A Kostyuk 2009-08-05 10:11:08 UTC
(In reply to comment #1)
> This seems to be working as you suggested using Evolution 2.27.5.
> 
> Can you retest with the latest release?
> 

Hello  Matthew!

I am sorry, but It's does not work for me :(

evolution 2.27.5-3 from Fedora Rawhide
Comment 3 Lonnie Borntreger 2009-08-25 10:33:34 UTC
I'm using 2.27.91 (changelog says rev 420427) on Mandriva (Cooker) and I have the same problem. When I hit reply to an email, it always picks the "main" email for the particular account folder I'm viewing, not the email address that the email was sent to (I have many alternate addresses coming to just a few different "real" accounts). I did not see this problem until the 2.27 series (which I jumped into at 2.27.90).
Comment 4 Lonnie Borntreger 2009-08-25 10:39:25 UTC
Oh..... before switching to 2.27, I was using 2.25 and it worked properly there.
Comment 5 Lonnie Borntreger 2009-08-25 20:32:48 UTC
One more thing... this should be "major" or "normal", not "enhancement".  It is broken functionality, not a request for new.
Comment 6 Alexey A Kostyuk 2009-08-26 06:08:19 UTC
(In reply to comment #5)
> One more thing... this should be "major" or "normal", not "enhancement".  It is
> broken functionality, not a request for new.

Hello Lonnie!

I use evolution since 2.26 version and this feature doesn't work properly. I don't know that it is work correctly in older evolution versions (such as 2.25).

p.s.

evolution from Fedora (Leonidas) Rawhide 2.27.90 still does not working...
Comment 7 Lonnie Borntreger 2009-08-26 08:17:08 UTC
(In reply to comment #6)
> I use evolution since 2.26 version and this feature doesn't work properly. I
> don't know that it is work correctly in older evolution versions (such as
> 2.25).

This has worked properly for me since the pre-1.0 times (iirc) all the way up to and including 2.25 - well, there was one point release in the 2.25 cycle that it didn't work (I reported it to the mailing list, but they had already fixed it for the next point release). I skipped 2.26, so I don't know if it worked or not in that version.
Comment 8 Yves-Alexis Perez 2009-09-03 06:08:03 UTC
Confirmed, it worked in 2.26 and doesn't work anymore in 2.27
Comment 9 Yves-Alexis Perez 2009-09-24 06:25:28 UTC
And it still doesn't work in 2.28.0.
Comment 10 Milan Crha 2009-10-05 15:48:14 UTC
There was a change within bug #524497 which is part of 2.28.0. That made the change, I guess.
Comment 11 Yves-Alexis Perez 2009-10-05 15:56:13 UTC
(In reply to comment #10)
> There was a change within bug #524497 which is part of 2.28.0. That made the
> change, I guess.

Hmmh, maybe, that'd mean the commited change was wrong. If that matters, my account setup is:

corsac () corsac.net (IMAP)
corsac () debian.org (None)
foo () foo (POP)
Comment 12 Joachim Breitner 2009-10-30 16:25:25 UTC
This seems to be a duplicate of #597592 (or rather the other way around).
Comment 13 Milan Crha 2009-10-30 17:53:57 UTC
*** Bug 597592 has been marked as a duplicate of this bug. ***
Comment 14 mcmanus 2009-11-05 18:08:52 UTC
this regression is included in the ubuntu karmic 9.10 update. (2.28.1)

adding commiter of bug 524497 to cc
Comment 15 David Grant 2009-11-18 06:54:55 UTC
(In reply to comment #10)
> There was a change within bug #524497 which is part of 2.28.0. That made the
> change, I guess.

Reverse-applying that patch fixes the problem for me (2.28.1)  It automatically selects the correct From address again.
Comment 16 Nick Jenkins 2009-11-26 23:46:04 UTC
There's been some discussion of this on the Evolution mailing list, trying to explain the problem that bug #524497 was fixing, and trying come up an approach that would simultaneously solve both that bug and this bug. Most recent mail in the thread is here:
http://mail.gnome.org/archives/evolution-list/2009-November/msg00246.html

Suggestion for picking the reply address is:
1) use the currently selected account, if the current account's email address is anywhere in list of recipients (TO, CC, etc).
2) use another configured account, if its email address is in the list of recipients.
3) If neither of these is the case, then that's less clear (although it may not be relevant to this bug, can maybe just continue with the current behavior?)
Comment 17 John Lange 2009-11-27 01:03:04 UTC
Just in case you don't take the time to read the list thread, in situation #3, I'd advocate that it should use the accout that has been designated as the default.

It seems to me that would be what you would expect and furthermore, if default isn't used in this situation then what is it for?
Comment 18 Nick Jenkins 2009-11-27 02:53:30 UTC
> I'd advocate that it should use the account that has been designated
> as the default.

I don't agree, I'd rather it used the current account in situation #3, where nothing matches. I have aliases for both work & home addresses, and if mail ends up in the work account (via an alias that I don't have an account for in evolution) and I reply, I'd like that reply to come from my work email address, and conversely if it ends up in the home account (via an alias with no account) I'd like the reply to come from the home email address. This behavior ensures a broadly-correct category of "from" address.

For the case where you want to keep your email provider's address hidden (e.g. gmail), couldn't the setting under Edit -> Preferences -> Mail accounts -> Edit -> Identity -> Email address, be set to "public_name@home.org" rather than "private_name@gmail.com"? Would that not hide the gmail account from the user's responses?

However, this is probably a separate issue to this bug, which is about restoring the "from" address behavior that existed in 2.26, whilst keeping the useful bits from bug #524497 that fixed stuff, and I think the suggestion in comment 16 should do that.

> if default isn't used in this situation then what is it for?

I have no idea, and I've wondered this before too :-)
Comment 19 Matthew Barnes 2009-11-27 03:28:58 UTC
(In reply to comment #18)
> > if default isn't used in this situation then what is it for?
> 
> I have no idea, and I've wondered this before too :-)

It's still useful when composing new messages and you've selected a folder under On This Computer or Search Folders -- i.e. no way to map the folder to a particular account.  But I too had to think on it for a moment.  Some smart heuristics could probably eliminate it entirely.
Comment 20 Nick Jenkins 2009-11-27 04:46:23 UTC
> when composing new messages and you've selected a folder under On This Computer 

Don't think it's needed for this scenario - doesn't the "from" address in this case come from the Edit -> Preferences -> Mail accounts -> Local Mail on this computer -> Edit -> Identity -> "Email address" field?

> or Search Folders

Good point, it's not clear to me how the "from" address would be determined in this case, since search folders can combine mail from multiple accounts ... it's a fairly obscure case though ;-)
Comment 21 Matthew Barnes 2009-11-27 05:33:13 UTC
(In reply to comment #20)
> Don't think it's needed for this scenario - doesn't the "from" address in this
> case come from the Edit -> Preferences -> Mail accounts -> Local Mail on this
> computer -> Edit -> Identity -> "Email address" field?

No, there is no single "Local Mail" / "On This Computer" account.  "On This Computer" (as shown in the folder tree) serves as a drop location for any number of POP3 or other types of locally-delivered accounts, each of which potentially having their own "From" address.
Comment 22 Nick Jenkins 2009-11-27 06:20:31 UTC
> Re comment #21 :
Ah, okay, understood, sorry for the confusion - I don't have any POP3 accounts setup, only some IMAP accounts + one local mail account, so I hadn't seen this.
Comment 23 Milan Crha 2009-11-27 10:11:16 UTC
(In reply to comment #20)
> > or Search Folders
> 
> Good point, it's not clear to me how the "from" address would be determined in
> this case, since search folders can combine mail from multiple accounts ...
> it's a fairly obscure case though ;-)

Might be "just" a special case, not using the actual folder in the heuristic, but ask the virtual folder for a Location of the selected message. The rest would be quite the same.
Comment 24 Matthew Barnes 2009-11-27 14:36:31 UTC
I like that, and it doesn't sound too difficult.  Any ideas for On This Computer?

My thought was it simply remember the last account that was used to compose a new message from that store, and restore that as the default.  (If that makes sense.)  Kind of like how we remember the current folder from one "Save As" dialog to the next.

If it looks like we could legitimately replace the default account concept with some smart heuristics, I'm up for attempting it.  We're getting a little off-topic here though and should probably move the discussion to the evolution-hackers list.
Comment 25 Joachim Breitner 2009-11-27 14:50:55 UTC
May I humbly remind the developers that this bug was primarily about a regression from earlier versions? So please consider fixing this independently of any new  features of heuristics in a near minor release, if possible.
Comment 26 John Lange 2009-11-27 21:29:44 UTC
I suppose that using the currently selected folder as the "from" address would make some sense. I think I still prefer using the default but you could always work-around that in by creating other accounts that do match.

However, "default" should always be used for "compose new message", regardless of the situation. Keep in mind you can compose a new email from anywhere inside Evolution (Calendar, Tasks, Contacts, etc.). Not to mention clicking a link on a web page when Evolution is entirely closed, or sending from other applications like f-spot (which seems to be broken right now btw).
Comment 27 Biscuits McCree 2009-12-21 19:13:53 UTC
I have 2.28.2 and this bug still exists.

It was not in earlier versions, I believe it was introduced in 2.27.x.
Comment 28 Biscuits McCree 2009-12-21 19:14:13 UTC
*** Bug 603398 has been marked as a duplicate of this bug. ***
Comment 29 Akhil Laddha 2010-01-07 04:08:28 UTC
*** Bug 606226 has been marked as a duplicate of this bug. ***
Comment 30 Denis Laxalde 2010-01-07 14:15:34 UTC
There is also a problem with drafts saved on a particular account.
When trying to re-edit a draft message, the From field is changed to the default account address ! Then, if you save it again without noticing this change, the message is moved to the default account Draft folder...
This looks like bug 212896 (which used to be fixed).
Might be a separate bug however.

Evolution 2.28.2 / Debian
Comment 31 Akhil Laddha 2010-01-15 03:49:05 UTC
*** Bug 606967 has been marked as a duplicate of this bug. ***
Comment 32 Akhil Laddha 2010-02-15 03:47:00 UTC
*** Bug 609951 has been marked as a duplicate of this bug. ***
Comment 33 Akhil Laddha 2010-02-15 03:47:17 UTC
*** Bug 564696 has been marked as a duplicate of this bug. ***
Comment 34 Akhil Laddha 2010-02-16 10:01:45 UTC
*** Bug 597442 has been marked as a duplicate of this bug. ***
Comment 35 roygbiver 2010-02-18 18:08:57 UTC
I changed my second address to default and it still uses my first address.  So the error is that it uses the first address no matter what, even if you have a different default address.
Comment 36 Matthew Barnes 2010-02-18 22:41:40 UTC
I implemented Nick's suggestion for 2.29.91.  Specifically:

1) Use the account associated with the currently selected folder if that
   account is enabled and its email address is listed among the message's
   recipients (in To: or Cc:).

   Note, the account cannot be determined for folders under "On This Computer"
   or "Search Folders".  In those cases we proceed with step 2.

2) Use any enabled account whose email address is listed among the message's
   recipients (in To: or Cc:).

3) Disregard the recipients and fall back to the new message heuristics.

Seems to work for me, but I may be overlooking some crazy corner case.  I know this isn't much of a window, but feedback on this before 2.29.92 ships (March 8) would be greatly appreciated so we can make sure we get it right for 2.30.

http://git.gnome.org/browse/evolution/commit/?id=320ec4b32e74fa948f122868ba5474a81fad5875
Comment 37 Yves-Alexis Perez 2010-02-19 07:37:14 UTC
In case of mailing lists, the email won't be in To: or CC: but will be in Delivered-To: header. Any chance it could be added to the heuristics? (the one a top, the last one is the one to consider).
Comment 38 Matthew Barnes 2010-02-19 13:16:46 UTC
For mailing lists use Reply to List (Ctrl+L), which uses heuristics specifically for mailing lists.
Comment 39 roygbiver 2010-02-20 06:46:28 UTC
Ok, this is literally blowing my mind now.  I changed my initial email address to my last one(removed and readded it), have the email address I want to use as the first AND Default email address, yet STILL when I hit reply to emails that are addressed to my default and now first address, it uses my initial address from before!  I don't know what's going on, seriously.

All I can think is that the initial email address is an IMAP address and the current default/first one is a local one that has "none" for protocol.
Comment 40 Akhil Laddha 2010-03-01 03:47:11 UTC
*** Bug 609341 has been marked as a duplicate of this bug. ***
Comment 41 Oded Arbel 2010-03-11 17:26:49 UTC
This problem looks to be solved for me in 2.29 (Fedora 13). shame I can't get it in Ubuntu.
Comment 42 Yves-Alexis Perez 2010-05-29 09:30:05 UTC
Even in 2.30 the account selection for reply-to-list seems to fail from time to time. In my case, with my @debian.org address which is forwarded to @corsac.net one. 

Maybe that confuses the mechanism, because when I hit Ctrl-L on a debian list folder, the @corsac.net is address is selected, not the @debian.org one (even though I'm subscribed with my @debian.org address).