环境:
Ubuntu 16.04.5 LTS
把465改成587
配置
/etc/ssmtp/ssmtp.conf:
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=yourmail@yourmaildomain
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.exmail.qq.com:587
AuthUser=yourmail@yourmaildomain
AuthPass=yourpassword
UseTLS=YES
UseSTARTTLS=YES
# Where will the mail seem to come from?
rewriteDomain=yourdomain
# The full hostname
hostname=yourhostname
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
/etc/ssmtp/revaliases:
root:yourmail@yourmaildomain:smtp.exmail.qq.com:587
ref: https://segmentfault.com/q/1010000004497746/a-1020000004501310