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.

  1. In .msmtprc turn auth on. This tries various options to find a method to authenticate, including your platform-specific keyring. On my platform this is Gnome keyring.
  2. Put the account details into Gnome keyring using the script provided as part of msmtp-gnome:
    $ python /usr/share/doc/msmtp/scripts/  -s -u <user> -e
  3. Tell Mutt:
    set sendmail     = /usr/bin/msmtp
    set from 	        =

That’s it. Go into Mutt, compose and send.