Debian发送邮件

配置 编辑

apt install mailutils

vi /etc/mail.rc

set from="jarvis0@qq.com"
set smtp="smtps://smtp.qq.com:465"
set smtp-auth-user="jarvis0@qq.com"
set smtp-auth-password=ytnowlfebjtndibc
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/root/.certs

修改hostname 编辑

hostnamectl set-hostname xxxx

发送 编辑

free -h|mail -s "free" w1073@qq.com