Today I sent an email from Mutt (well Mutt-kz actually), which means from msmtp (well msmtp-gnome, actually). The Important thing here is that I didn’t have to type in my password to do it; msmtp-gnome (installed from the Ubuntu sofitware centre) will fetch a password from the Gnome keyring which is unlocked if I’m logged in.
This was easier than I expected, but it took some reading to figure out just how little there was to do.
auth on. This tries various options to find a method to authenticate, including your platform-specific keyring. On my platform this is Gnome keyring.
- Put the account details into Gnome keyring using the
msmtp-gnome-tool.pyscript provided as part of msmtp-gnome:
$ python /usr/share/doc/msmtp/scripts/msmtp-gnome-tool.py -s -u <user> -e mail.server.org
- Tell Mutt:
set sendmail = /usr/bin/msmtp set from = email@example.com
That’s it. Go into Mutt, compose and send.