Sample Header Ad - 728x90

Multiple smtp accounts with mutt and msmtp

3 votes
2 answers
5008 views
I use mutt with two different *imap* accounts, and have configured smtp accounts **A** and **B** with msmtp and mutt. If I don't specify a default account in .msmtprc, mutt complains there is no default account when I try to send. If I set a default account **A**, mutt uses this for all imap accounts. *How can I make it use the smtp account **B** for the corresponding imap account?* In the account **B** mutt config file I've set the following: ## sent set sendmail="/usr/bin/msmtp" set use_from=yes set realname="My Name" set from=my@gmail.com set hostname="gmail.com" set ssl_force_tls=yes set imap_pass=$my_pass unset ssl_starttls in .msmtprc the account configuration reads: defaults tls on port 587 [...] account gmail tls_fingerprint 39:7C:59:20:DE:55:51:F4:8B:72:1D:B5:B2:26:8A:D1:DB:90:C6:28:80:77:F9:B5:EC:C1:BF:1C:6F:4D:A1:63 from my@gmail.com host smtp.gmail.com auth on user my@gmail.com passwordeval gpg2 --no-tty -q -d ~/mygmail.gpg
Asked by lash (811 rep)
Aug 10, 2017, 09:52 AM
Last activity: Sep 16, 2019, 08:55 PM