3

Trying to send an email from Ubuntu 14.04 to yahoo smtp.

My ip address at home changes and I would like to know it during the day. I was just using wget http://wtfismyip.com/text and then I want to email the result of that to myself.

I get this error after running ssmtp me@yahoo.com < text:

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

I looked at the webpage but it doesn't help.

Here is my /etc/ssmtp/ssmtp.conf:

mailhub=smtp.mail.yahoo.com:587

FromLineOverride=YES

hostname=localhost

rewriteDomain=yahoo.com

root=me@yahoo.com

UseTLS=YES

AuthMethod=LOGIN

AuthUser=me@yahoo.com

AuthPass=xxxxxx

UseSTARTTLS=Yes

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

Maybe there is a command line that does it? It can be done in cygwin like so:

email -V -f me@yahoo.com -s "subject" -r smtp.mail.yahoo.com -p 587 -tls -m login -u me@yahoo.com -i pa$$w0rd me@yahoo.com < email.txt
Jeremy
  • 31
  • 1
  • 2

1 Answers1

1

You also need to edit sSMTP aliases /etc/ssmtp/revaliases
e.g. sudo nano /etc/ssmtp/revaliases
in this case I have set up an alias for users pi and motion

# 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.
#
pi:YOURNAME@yahoo.com:smtp.mail.yahoo.com:587
motion:YOURNAME@yahoo.com:smtp.mail.yahoo.com:587

===

my configuration for /etc/ssmtp/ssmtp.conf:

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=YOURNAME@yahoo.com

# 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
hostname=YOURNAME@yahoo.com

# 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

AuthUser=YOURNAME@yahoo.com
AuthPass=YOURPASSWORD
UseTLS=YES
UseSTARTTLS=YES

===

Source: https://help.ubuntu.com/community/EmailAlerts

illnr
  • 111