On Tue, 18 Dec 2012, Jan Kundrát wrote:
Hi, thanks to a great work by two GCI students, Mohammed Nafees and Peter
Amidon, we now have support for adding signatures (footnotes) to the e-mails
and also ability to pick a "sender identity" when composing e-mails. Thanks
for their work! The multiple identities is the thing which I'd like to focus
on in this mail.
In Trojitá, the sender identities are not tied to the IMAP account at all;
this is by design to allow use cases like mine where both personal and
work-related mail not matching a certain rule get delivered into a single
INBOX. What I'd like to have is a feature which picks up the correct identity
when I click "reply".
There are two ways to achieve that:
1) Add a list of domains (or regular expressions?) for each identity. That
way, I can specify that everything which goes to or originates from
company1.com shall use identity "Company 1", anything concerning company2.com
or somefunnyproject.org shall use "Company 2" and anything else just the
default personal identity "Personal". The important bits are that the list of
domains "tied" to each identity will probably be rather small and that it
will be always managed by an explicit user action. The good parts is that the
user will always get a deterministic result, the huge drawback is that this
feature would be rather difficult to discover.
Explicit lists like this need to be supported. Long term this should be made as
flexible as possible (I may want to use different addresses for different
mailing lists at the same domain, so that replies get sorted into plus folders
for example)
you should also have a way to say that if it's part of a large group, but not
part of a more specific subgroup, don't fall back to default, ask.
so if it's going to a mailing list domain, but not to a list you have configured
yet, it wouldn't use the default, but would ask you.
a useful generic thing would be that if one of your known addresses is a
participant in the e-mail thread, use that as your reply address (and sometimes
you will get multiple matches, at which time you have to ask the user)
2) For each recipient the user has ever sent a mail to, remember the used
identity automatically and use that in future by default. The benefits are
that this will likely fit most of the users quite well and without much
effort. The drawbacks are that these data cannot be saved in an address book
(trojita shall work against many different address book implementations and
we cannot e.g. save stuff into LDAP typically) and that the data on which the
decisions are based would not be visible to the user (they *could* be, but
that's an extra work). (Thanks to R4md4c on IRC for proposing this
possibility.)
This is a useful option, but is not always going to be correct.
As for storage, create an IMAP folder to hold the mapping, do something trivial
like list the from and to addresses with a blank message and a subject like
"autoreplay mapping"
or you can do what pine does with it's remote addressbook, have the message
contain a from to mapping and have each message be it's own version.
if you detect an ambiguity, you can ask the user which they should use.
David Lang
A few corner cases to keep in mind:
Suppose that I'm subscribed to [email protected] mailing list --
or actually me [email protected] address is subscribed. Someone sends a
mail to that list and I want to respond to th author off-list. I've never
talked to that person before, so 2) falls back to the default identiy.
However, if 1) was used *and* the algorithm consulted all recipients of the
original message, I could have created a rule up front saying that anything
matching "@community.example.org$" shall use the identity-2 instead of the
default one.
Anyway, if anyone has an idea about how to do this best, I'm all ears. As
always, patches welcome.
With kind regards,
Jan