[neomutt-users] setting up multiple accounts with hooks

znoteer at mailbox.org znoteer at mailbox.org
Sun Dec 9 20:54:37 CET 2018


I have 3 email providers one of which allows me a couple of aliases in addition to my main email address.  I'd like to set up mutt to be able to send mail from all of those accounts.  Receiving has not been a problem using imap.

To send I need to set the From: header value, the signature to use, and the smtp server to use.  So far nothing has worked as desired.  I've tried with send-hooks and with account-hooks.

Currently, I'm trying to make account hooks work.  I've only got two in my config file but only one is used. Here are the sanitized lines:

----------- begin excerpt ------------------
account-hook znoteer1\@.*esp1\.provider\.com my_hdr From: Znoteer <znoteer1 at esp1.com> ; set smtp_url=smtps://znoteer1@esp1.provider.com@smpt.esp1.provider.com ; set signature=~/.config/sig/sig1

account-hook znoteer2\@.*esp2\.com my_hdr From: Znoteer 2 <znoteer2 at esp2.com> ; set smtp_url=smtps://znoteer2@esp2.com@smtp.esp2.com ; set signature=~/.config/sig/sig2
-------------- end excerpt -----------------

Only the second line is used.  I have to change to order of the lines to get the other one to work.  And it works all the time.  That is to say, the From: header smtp server and signature from the second line get used for all sent mail even if I am not in that account when I send.

Can anyone tell me what I am doing wrong?

znoteer at mailbox.org

More information about the neomutt-users mailing list