# Example for a user configuration file ~/.msmtprc # With modern mail services that publish autoconfiguration information, # you can simply run 'msmtp --configure yourmail@example.com' to get # a basic working configuration. # This example focusses on TLS and authentication. Features not used here # include logging, timeouts, SOCKS proxies, TLS parameters, Delivery Status # Notification (DSN) settings, and more. # Set default values: use the mail submission port 587, and always use TLS. # On this port, TLS is activated via STARTTLS. defaults port 587 tls on tls_starttls on # Define a mail account at a freemail service account freemail # Host name of the SMTP server host smtp.freemail.example # Envelope-from address from joe_smith@freemail.example # Authentication auth on user joe.smith # Password method 1: Add the password to the system keyring, and let msmtp get # it automatically. To set the keyring password using libsecret: # $ secret-tool store --label=msmtp \ # host smtp.freemail.example \ # service smtp \ # user joe.smith # Password method 2: Store the password in an encrypted file, and tell msmtp # which command to use to decrypt it. This is usually used with GnuPG, as in # this example. Usually gpg-agent will ask once for the decryption password. passwordeval gpg2 --no-tty -q -d ~/.msmtp-password.gpg # You can also store the password directly in this file or have msmtp ask you # for it each time you send a mail, but one of the above methods is preferred. # A second mail address at the same freemail service: it uses the same settings # and just changes the envelope from address account freemail2 : freemail from joey@freemail.example # Some other mail service account company host mail.company.example from smithjoe@company.example auth on user company12345 # this assumes the password is stored in the keyring # Set a default account account default : freemail