Update example user configuration

pull/86/head
Martin Lambers 2 months ago
parent b0a39ce01e
commit f44964c4ec
  1. 70
      doc/msmtprc-user.example

@ -1,80 +1,54 @@
# Example for a user configuration file ~/.msmtprc
#
# This file focusses on TLS and authentication. Features not used here include
# logging, timeouts, SOCKS proxies, TLS parameters, Delivery Status Notification
# (DSN) settings, and more.
# With modern mail services that publish autoconfiguration information,
# you can simply run 'msmtp --configure yourmail@example.com' to get
# a basic working configuration.
# Set default values for all following accounts.
defaults
# 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.
# Use the mail submission port 587 instead of the SMTP port 25.
# Set default values: use the mail submission port 587, and always use TLS.
# On this port, TLS is activated via STARTTLS.
defaults
port 587
# Always use TLS.
tls on
tls_starttls on
# Set a list of trusted CAs for TLS. The default is to use system settings, but
# you can select your own file.
#tls_trust_file /etc/ssl/certs/ca-certificates.crt
# A freemail service
# Define a mail account at a freemail service
account freemail
# Host name of the SMTP server
host smtp.freemail.example
# As an alternative to tls_trust_file, you can use tls_fingerprint
# to pin a single certificate. You have to update the fingerprint when the
# server certificate changes, but an attacker cannot trick you into accepting
# a fraudulent certificate. Get the fingerprint with
# $ msmtp --serverinfo --tls --tls-certcheck=off --host=smtp.freemail.example
#tls_fingerprint 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33
# Envelope-from address
from joe_smith@freemail.example
# Authentication. The password is given using one of five methods, see below.
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 Gnome's libsecret:
# 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.
# Password method 3: Store the password directly in this file. Usually it is not
# a good idea to store passwords in cleartext files. If you do it anyway, at
# least make sure that this file can only be read by yourself.
#password secret123
# Password method 4: Store the password in ~/.netrc. This method is probably not
# relevant anymore.
# Password method 5: Do not specify a password. Msmtp will then prompt you for
# it. This means you need to be able to type into a terminal when msmtp runs.
# A second mail address at the same freemail service
# 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
# The SMTP server of your ISP
account isp
host mail.isp.example
from smithjoe@isp.example
# Some other mail service
account company
host mail.company.example
from smithjoe@company.example
auth on
user 12345
user company12345
# this assumes the password is stored in the keyring
# Set a default account
account default : freemail

Loading…
Cancel
Save