[Home]History of UserStory/MultiAccounts

MuttWiki | RecentChanges | Preferences | EDITwiki


Revision 5 . . (edit) May 26, 2006 3:30 am by AlainBench [Grumf: forgotten double quotes]
Revision 3 . . (edit) May 13, 2006 1:23 pm by Redondos [Fixes in the From: header section]
  

Difference (from prior major revision) (minor diff)

Added: 2a3


Changed: 10c11
If you also want to also include the real names the person that e-mailed you used, you need to use this.
If you want to also include the real names the person that e-mailed you used, you need to use this.

Added: 12a14,17

Also verify that the $use_from variable is set to "yes".
It is correct by default, but may be unset say in Debian's global /etc/Muttrc.


Changed: 15c20
set alternates="john@isp1.com|john@isp2.com"
set alternates="^(john@isp1\\.com|john@isp2\\.com)$"

Changed: 17c22
alternates "john@isp1.com|john@isp2.com"
alternates ^john@isp1\\.com$ ^john@isp2\\.com$

Removed: 22,23d26
send-hook '~f ^john@isp1.com$' 'set realname="John Doe"'
send-hook '~f ^john@isp2.com$' 'set realname="Johnny"'

Changed: 25,28c28,48

Default From: header



Up until now, you can reply to messages and mutt will automagically select the appropriate From: header based on the message you are answering's To: header. But when composing a new message, your From: address will look something like $USERNAME@$HOSTNAME. To deal with this, you can use a default send-hook, plus one for each of your accounts:
send-hook .* 'my_hdr From: John Doe <john@isp1.com>'
send-hook '~f ^john@isp2.com$' 'my_hdr From: John Doe <john@isp2.com>'
send-hook . 'set realname="John Doe"'
send-hook "~f ^john@isp2\\.com$" 'set realname="Johnny"'

Default account for new messages



Up until now, you can reply to messages and mutt will automagically select the
appropriate From: header based on the message you are answering's To: header.
For when composing a new message, declare statically default $from and $realname:

set from=john@isp1.com
set realname="John Doe"

In addition to this static setup, you can change $from and $realname at will,
perhaps in folder-hooks or macros.

Specific accounts for specific recipients



If you want to override the whole scheme described on this page,
and write to some recipients always with a fixed From: field,
whatever new mail or reply, you can use:

send-hook . "unmy_hdr From:"
send-hook ^emm@example\\.com$ "my_hdr From: agent 007 <john@isp1.com>"

Changed: 30c50,52
Just remember to put the default one first, otherwise it will catch every account.
This override has a weakness:
Mails resent to those recipients with the <bounce-message> function (bound to the [b] key by default)
will be Resent-From: your default account, instead of the expected fixed account.

MuttWiki | RecentChanges | Preferences | EDITwiki
Search: