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 213863 - Allow multiple e-mail aliases for reply account matching
Allow multiple e-mail aliases for reply account matching
Status: RESOLVED DUPLICATE of bug 215115
Product: evolution
Classification: Applications
Component: Mailer
3.10.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[accounts]
: 205848 (view as bug list)
Depends on:
Blocks: 215161
 
 
Reported: 2001-10-29 03:08 UTC by dan.hensley
Modified: 2015-08-21 21:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against HEAD (12.04 KB, patch)
2002-01-24 02:13 UTC, ian
none Details | Review
Updated patch (16.34 KB, patch)
2002-01-24 15:17 UTC, ian
none Details | Review
Patch file (30.73 KB, patch)
2002-01-26 16:19 UTC, ian
none Details | Review
sample implementation of aliases exclusion (2.45 KB, text/plain)
2011-03-01 23:10 UTC, nowak2000
  Details

Description dan.hensley 2001-10-29 03:08:04 UTC
The summary may be vague, but here's my scenario.  I have an IMAP account
set up for my work e-mail.  I have my e-mail address set as
dan.hensley@ata-engineering.com.  When I get e-mail sent to me at that
address, Evo automatically sets my From address to the right one.  However,
dan.hensley@ata-e.com is another valid address for the same account. 
Naturally this one doesn't match, so my e-mail From address is set to
another account, which is my default.

I would like to be able to specify multiple aliases (or perhaps aliases by
regexp?) for a given mail account.  This capability would be nice for other
scenarios that I can imagine as well (someone sends you e-mail to two
different accounts, but you always want your From address to be from one of
them).

Another potential solution for this is to have per-folder default e-mail
addresses.
Comment 1 Jeffrey Stedfast 2001-11-20 19:06:40 UTC
feature = future
Comment 2 ian 2002-01-24 02:12:36 UTC
I had implemented this feature myself, because I found it useful.
You can attach a list of alternate addresses or a regexp to each
account, which will be used in just the way you suggest.

Then I found this bugzilla entry, so I'm attaching the diff.
This is against today's HEAD.
Comment 3 ian 2002-01-24 02:13:45 UTC
Created attachment 40959 [details] [review]
Patch against HEAD
Comment 4 ian 2002-01-24 15:16:41 UTC
Here's an updated patch.  It correctly handles attempts to use invalid
regexps (I didn't realize you had to regfree if regcomp returned an
error), and patches the new account druid to only let you "Next>" if
you've entered a valid one.
Comment 5 ian 2002-01-24 15:17:25 UTC
Created attachment 40960 [details] [review]
Updated patch
Comment 6 ian 2002-01-26 16:16:05 UTC
This new patch also allows you to specify a list of addresses *not* to
add to the Cc: list when you do a "reply to all".

So for example, I could set my work account's "alternate addresses"
to the regexp ".*@(zeroknowledge\.com|zks\.net)$" so that replying to
any work-related email (including mailing lists, etc.) will use the
work account.  Then I set my "remove from cc list" regexp to
"ian|iang|ian\.goldberg@(zeroknowledge\.com|zks\.net$" so that only my
own addresses get removed.

This patch is also cleaned up a bit, and includes a detailed ChangeLog.
Comment 7 ian 2002-01-26 16:19:46 UTC
Created attachment 40975 [details] [review]
Patch file
Comment 8 Jeffrey Stedfast 2002-05-27 07:34:25 UTC
*** bug 205848 has been marked as a duplicate of this bug. ***
Comment 9 André Klapper 2005-01-14 18:47:52 UTC
related to bug 215161
Comment 10 André Klapper 2005-07-20 17:24:30 UTC
setting the first and second patch to "obsolete" since only the latest is correct.
Comment 11 Jeffrey Stedfast 2007-01-21 20:04:33 UTC
does this patch even still apply to current code?
Comment 12 Srinivasa Ragavan 2007-08-23 05:13:44 UTC
I dont think most of the files dont even exist today. Moving it to obsolete.
Comment 13 Yves-Alexis Perez 2009-09-03 06:10:08 UTC
The feature would be nice to have though. Or maybe configure it with folders. A lot of people triage bugs in folders, and usually the From: associated is unique for a folder. I think claws mail does that, and it seems very handy.
Comment 14 nowak2000 2011-03-01 23:10:41 UTC
Created attachment 182219 [details]
sample implementation of aliases exclusion
Comment 15 nowak2000 2011-03-01 23:11:56 UTC
I sketched the implementation for the feature described in the comment 6 by ian. It uses gconf to store the list of "alternate addresses", so they can be removed from To: and Cc: headers.

Please treat this as a pseudocode, because I had no chance to compile it. The diff was made against evolution-2.32.2-0ubuntu3 sources.

Little things missing:
- patching the schema (mail/evolution-mail.schemas.in) to include the key as a list of strings like with the headers,
- little editor in the preferences window.
Comment 16 nowak2000 2011-03-01 23:52:03 UTC
Comment on attachment 182219 [details]
sample implementation of aliases exclusion

>+	while (p) {
>+		gint exc_index;
>+		gchar *exclude = (gchar *) p->data;
>+
>+		exc_index = camel_internet_address_find_address (to, exclude, NULL);
>+		camel_address_remove (to, exc_index);
>+
>+		exc_index = camel_internet_address_find_address (cc, exclude, NULL);
>+		camel_address_remove (cc, exc_index);
>+
>+		p = p->next;
>+	}

There are conditions missing:
...
if (exc_index != -1)
	camel_address_remove (to, exc_index);
...
if (exc_index != -1)
	camel_address_remove (cc, exc_index);
...
Comment 17 Ralf 2013-09-25 09:22:39 UTC
For POP/SMTP usage such a feature is _needed_.
It should be possible to allocate a mailing list/recipient to one of the available accounts.

The contact editor allows to check "Wants to receive HTML mail", an
option I don't need, instead "Use account foo when sending to this
recipient" would be comfortable, so it not only would work for replies, but also for new emails.

Regards,
Ralf
Comment 18 André Klapper 2013-09-25 11:54:28 UTC
(In reply to comment #17)
> It should be possible to allocate a mailing list/recipient to one of the
> available accounts.

That might be bug 215161 and bug 215115 instead.
Comment 19 Milan Crha 2013-10-08 11:31:07 UTC
I added related functionality within a fix for bug #215115, thus I mark this as a duplicate of it.

*** This bug has been marked as a duplicate of bug 215115 ***