尝试从 Ubuntu 14.04 发送电子邮件到 yahoo smtp

尝试从 Ubuntu 14.04 发送电子邮件到 yahoo smtp

尝试从 Ubuntu 14.04 发送电子邮件到 yahoo smtp。

我家里的 IP 地址发生了变化,我想在白天知道它。我刚刚使用过wget http://wtfismyip.com/text,然后想将结果通过电子邮件发送给自己。

运行后出现此错误:ssmtp [email protected] < text

ssmtp: 553 From address not verified - see
http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

我看了网页,但没有帮助。

这是我的/etc/ssmtp/ssmtp.conf

mailhub=smtp.mail.yahoo.com:587

FromLineOverride=YES

hostname=localhost

rewriteDomain=yahoo.com

[email protected]

UseTLS=YES

AuthMethod=LOGIN

[email protected]

AuthPass=xxxxxx

UseSTARTTLS=Yes

TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt

也许有命令行可以做到这一点?可以在 cygwin 中执行以下操作:

email -V -f [email protected] -s "subject" -r smtp.mail.yahoo.com -p 587 -tls -m login -u [email protected] -i pa$$w0rd [email protected] < email.txt

答案1

您还需要编辑 sSMTP 别名/etc/ssmtp/revaliases
例如,sudo nano /etc/ssmtp/revaliases
在这种情况下,我为用户 π运动

# Format:       local_account:outgoing_address:mailhub
#
# Example: root:[email protected]:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
#
pi:[email protected]:smtp.mail.yahoo.com:587
motion:[email protected]:smtp.mail.yahoo.com: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.
[email protected]

# 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.mail.yahoo.com:587

# Where will the mail seem to come from?
rewriteDomain=yahoo.com

# The full hostname
[email protected]

# 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=No

[email protected]
AuthPass=YOURPASSWORD
UseTLS=YES
UseSTARTTLS=YES

===

来源: https://help.ubuntu.com/community/EmailAlerts

相关内容