|
|
|
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. |
|
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. |
|
set alternates="john@isp1.com|john@isp2.com" |
|
set alternates="^(john@isp1\\.com|john@isp2\\.com)$" |
|
alternates "john@isp1.com|john@isp2.com" |
|
alternates ^john@isp1\\.com$ ^john@isp2\\.com$ |
|
send-hook '~f ^john@isp1.com$' 'set realname="John Doe"' send-hook '~f ^john@isp2.com$' 'set realname="Johnny"' |
Default From: headerUp 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 messagesUp 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 recipientsIf 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>" |
|
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. |