You can configure mutt to use different from addresses (via your ~/.muttrc
), e.g.:
set use_from = yes
set envelope_from = yes
set from = default@example.org
set realname = "Default Realname"
# list of all your addresses
alternates @example\.org$
You can setup some macros to explicitly switch the from before composing a new mail:
macro index \e1 "set from=foo@example.org\n" "Select foo address"
macro index \e2 "set from=bar@example.org\n" "Select bar address"
# ...
When replying to an email, you can configure mutt to automatically use the to-header as from address (this is point 2 from your question):
set reverse_name=yes
Don't reuse the real name - helps when people send you crap like "foo@example.org" <foo@example.org>
:
set reverse_realname=no
Then you can set up some hooks to make things depend on header values - e.g. to use different fcc folders:
fcc-hook '~f ^foo@example\.org' '=foo'
(There are also other hooks, like send-hook
etc.)
I would look into the hooks to implement something like point 1 from your question. Although, you would need some external scripting to maintain such a database.
Depending on your current MTA setup you may have to change its config as well, i.e. such that it accepts different envelope froms.
It is also possible to use different SMTP relays depending on e.g. the hostname of the envelope from - but this must be configured in the MTA.
Thunderbird spellcheck have some limitation/settings, especially when we write/reply-to a long email it can get disabled, this is because of the setting:
extensions.spellcheck.inline.max-misspellings
default value is 500
if we increase that to 10000
or a higher value the spellcheck won't get disabled because of the email length.
Best Answer
If you reply to an email the "original" email address will only be used by Thunderbird if there is an identity that matches that email address for that account. If such an identity is not available the default identity for that account is taken, if you hit Reply.
What you need to do is add extra identities to each of the accounts for the alternate email addresses.
However if you move a mail to
abc@xyz.com
to the account forklm@fud.com
and in the settings for that latter account add an identity with at "Your Name" specified with your name, and "Email Address" set toabc@xyz.com
, then Thunderbird will putabc@xyz.com
as the return address if you press Reply (even if this is not the default).You can add additional identities to an account by right clicking the account in Thunderbird's left pane, then clicking Settings, then on the Account Settings form that pops up click Manage Identities... (just above Ok in the lower right corner.
Click Add, and fill out the first two fields as described, and check that the appropriate SMTP server is selected (if you sent as
abc@xyz.com
you might want to use the smtp server associated with that account and not the one associated with the account you add this extra identity to).You need to do this on each account for all your email addresses (assuming you don't want to worry about where you move which mail) that you want to have their incoming email address as reply to address.
If you have 4 email accounts set up in Thunderbird, this requires you to add the3 "other" addresses as extra identities to each of the accounts, and for each select the appropriate SMTP server.
The above will result in no difference for the recipient (in headers, route etc) of a reply whether you first move an email from one account to another, or directly reply from the account where you received the email.