今天用msmtp给自己发了封测试邮件,成功了!配置如下:
以后还是应该多看看系统文档,然后再上网找答案。
用 $msmtp --host=smtp.gmail.com --serverinfo 测试gmail是否支持TLS加密
#Set default values for all following accounts
defaults
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/Mail/msmtplog
# Gmail service
account gmail
host smtp.gmail.com
from myaccountname@gmail.com
auth on
user myaccountname
password mypassword
#port 587 #可要可不要的
# A freemail service
#account freemail
#host smtp.freemail.example
#from joe_smith@freemail.example
#auth on
#user joe.smith
#password secret
# A second mail address at the same freemail service
#account freemail2 : freemail
#from joey@freemail.example
# The SMTP server of the provider.
#account provider
#host mail.provider.example
#from smithjoe@provider.example
#auth on
#user 123456789
#password my_password
# Set a default account
account default : gmail
至此,msmtp配置完成了。要更复杂的配置,请参考msmtp manual
阅读(3074) | 评论(2) | 转发(0) |