这过去是起作用的,但现在不行了?
NOW=$(date +%m-%d-%Y_%I:%M%p)
CONTENT="Backup to Maxtor Drive performed on $NOW ."
echo "Sending email."
/usr/sbin/ssmtp -t << EOF
To: 7@yahoo.com
From: 7@yahoo.com
Subject: Backups to Maxtor Drive
$CONTENT
EOF我重新安装了ssmtp
ssmtp: Cannot open mail:25ssmtp.conf
# The full hostname
hostname=7
# 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
root=7@yahoo.com
mailhub=smtp.mail.yahoo.com:587
AuthUser=7
AuthPass=***
UseSTARTTLS=YES再确认
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
7@yahoo.com:smtp.mail.yahoo.com:587发布于 2019-09-01 15:43:59
对用户的权限不能授予,我尝试了$sudo chmod ug+rwx /etc/ssmtp/ssmtp.conf,并对revaliases.It工作过了!
https://askubuntu.com/questions/1115955
复制相似问题