Running Linux Mint 17. I have setup smartmontools to monitor my hard drive, that seems to work OK but there is a feature to generate an email when it detects an error and I cannot get the email to work. I have found several hit for it but still cannot fix it. ssmtp.conf looks like this

#
# Config file for sSMTP sendmail
#

root=controlsulley@gmail.com

mailhub=smtp.gmail.com:587
AuthUser=controlsulley@gmail.com 
AuthPass=*********
UseTLS=YES
#UseStartTTLS=YES

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

# The full hostname
hostname=gmail.com

But when I run it I get

mick@Mint17Desk:~$ sendmail -s 'Hello world' mick@sulley.info
test mail
sendmail: Cannot open smtp.gmail.com:587
mick@Mint17Desk:~$ 

and maillog shows

Oct  2 16:20:01 localhost CRON[4626]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp)
Oct  2 16:20:01 localhost sSMTP[4644]: Creating SSL connection to host
Oct  2 16:20:01 localhost sSMTP[4644]: SSL connection using (null)
Oct  2 16:20:01 localhost sSMTP[4644]: Cannot open smtp.gmail.com:587
Oct  2 16:20:01 localhost CRON[4625]: (smmsp) MAIL (mailed 1 byte of output; but got status 0x0001, #012)

I guess my setup is wrong somewhere but I cannot see where.
Thanks
Mick

Recommended Answers

All 5 Replies

Hi,

try to change port number to 465, it works fine for me.

commented: spot-on +14

Wow!! Yes 465 works.

I have a python program that generates mails on that same account and that works on 587, so I couldn't see why this didn't, but hey ho it works now.

Thanks for your help

OK next question, sendmail works from command line but I have set smartmon to generate a mail each time and what I get is subject -
Cron <smmsp@Mint17Desk> test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
message -
/usr/share/sendmail/sendmail: 899: /usr/share/sendmail/sendmail: /usr/sbin/sendmail-msp: not found

Any idea how I fix that?
Mick

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.