SSMTP在我的RPi上已经工作了多年-最新的信息。 现在,我迁移到了克星-此步骤之后,它现在失败了。
$ cat /etc/ssmtp/ssmtp.conf
root=user@mydomain.com
mailhub=smtp.gmail.com:587
hostname=localhost
UseSTARTTLS=YES
AuthUser=user@gmail.com
AuthPass=very_secret
FromLineOverride=YES
$ echo "MailBody"|mail --debug-level=3 -s "My Subject" mailaddress@domain.com
mail: sendmail binary: /usr/sbin/sendmail
mail: source=system, name=user, passwd=x, uid=1001, gid=1000, gecos=user,,,, dir=/home/user, shell=/bin/bash, mailbox=/var/mail/user, quota=0, change_uid=1
mail: source=system, name=user, passwd=x, uid=1001, gid=1000, gecos=user,,,, dir=/home/user, shell=/bin/bash, mailbox=/var/mail/user, quota=0, change_uid=1
mail: mu_mailer_send_message(): using From: user@localhost
mail: Sending headers...
mail: Sending body...
mail: /usr/sbin/sendmail exited with: 1
mail: progmailer error: Process exited with a non-zero status
mail: cannot send message: Process exited with a non-zero status
mail: source=system, name=user, passwd=x, uid=1001, gid=1000, gecos=user,,,, dir=/home/user, shell=/bin/bash, mailbox=/var/mail/user, quota=0, change_uid=1
$ echo $?
36
我有很多shell脚本使用以下命令发送邮件:
echo "MailBody"|mail -s "My Subject" emailaddress@domain.com
=>因此,如果不再支持SSMTP,我将根据该语法寻求解决方案...
感谢您的帮助!