Setup
See arch wiki for complete setup in archlinux.
My setup
# Set default values for all following accounts.
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /tmp/msmtp.log
account gmail
host smtp.gmail.com
port 587
user alexarians@gmail.com
from alexarians@gmail.com
passwordeval pass google.com/app_pass/alexarians@gmail.com
account hotmail
host smtp-mail.outlook.com
port 587
user christian.alexander@windowslive.com
from christian.alexander@windowslive.com
passwordeval pass outlook.live.com/christian.alexander@windowslive.com
account ymail
host smtp.mail.yahoo.com
port 587
user christian.alexander@ymail.com
from christian.alexander@ymail.com
passwordeval pass login.yahoo.com/app_pass/christian.alexander@ymail.com
account yahoo
host smtp.mail.yahoo.com
port 587
user alexforsale@yahoo.com
from alexforsale@yahoo.com
passwordeval pass login.yahoo.com/app_pass/alexforsale@yahoo.com
account zum
host localhost
port 1025
tls off
tls_starttls off
auth plain
user ZUM\kristian.alexander
from kristian.alexander@zumstar.co.id
passwordeval pass zumstar.co.id/kristian.alexander
account mkn
tls off
tls_starttls off
auth plain
host localhost
port 1026
user MKN\kristian.alexander
from kristian.alexander@mkncorp.com
passwordeval pass mkncorp.com/kristian.alexander
account default : yahoo
Notes:
passwordeval
uses pass to avoid storing password in clear text.