0

This used to work, but does so no longer?

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

I reinstalled ssmtp and I get

  ssmtp: Cannot open mail:25

ssmtp.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

revaliases

# 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
fixit7
  • 3,399

1 Answers1

0

Permissions to user may not given.I tried $sudo chmod ug+rwx /etc/ssmtp/ssmtp.conf and do the same for revaliases.It worked!