[MlMt] Set From: field depending on recipient address

Benny Kjær Nielsen mailinglist at freron.com
Mon Oct 14 05:21:46 EDT 2013


On 14 Oct 2013, at 9:33, Alberto Caporro wrote:

> So, please, consider a more general From-derivation a feature request 
> :-)

This is one of those things that could be simple to implement when I've 
decided how to do it, but it's hard to decide. As usual, allow me to 
think out loud and a decision might follow :-)

The problem: Identify all sent messages in all mailboxes of all accounts 
with no false positives/negatives. Do it as quickly as possible.

Current solution: Simply use all messages located in “Sent 
Messages”.

Ideas:

1. Identify sent messages by looking for messages with no `Received` 
headers. This triggers loading database indexes for `Received` headers 
which I would currently like to avoid (it's slow). Also, it could 
involve a large number of false positives, for example, for me it 
includes all messages in “[Gmail]/Chats” and there are probably 
users with similar issues. An alternative header is the `Return-Path` 
header, but this is also not 100% reliable.

2. Identify sent messages by searching for any messages from email 
addresses listed in the account settings. The obvious problem is that 
this does not include messages which only match an “Address Pattern” 
of an account -- and the query system does not allow searches based on 
regular expressions.

3. Identify sent messages by searching for any messages from names 
listed in the account settings. This can include too many messages for 
users with common names, but the from derivation could subsequently 
verify addresses by checking the email address (also with Address 
Pattern).

4. Introduce an IMAP keyword for marking sent messages. Automatically 
mark messages when sending and use it to locate sent messages for the 
 From-derivation. Some servers (MS Exchange) do not support this and it 
would only work if only sending using MailMate.

5. Make “Sent Messages” configurable such that users can choose to 
configure it as a smart mailbox instead of a universal mailbox (or maybe 
allow it to behave like both). This doesn't work 'out-of-the-box' and 
for a user with many email addresses it could be tedious to setup 
conditions (most often it would work using names only).

I think 3 and 5 are the most interesting. I like 3 because it would work 
out-of-the-box and I like 5 because it's highly configurable. It could 
be both, but I guess I'm still undecided (leaning towards 5).

Note that this is closely related to the hidden preference 
`MmAddressCompletionMailbox` and a solution to the above should also 
work as a solution to that problem.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20131014/8498240d/attachment.html>


More information about the mailmate mailing list