sSMTP : Cannot open

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

sSMTP : Cannot open

Postby W.W. » Wed May 17, 2017 8:13 am


I try to set up ssmtp to send the notificatins of nagios by email but I have the below error

Code: Select all
May 17 14:43:10 VM004 sSMTP[31783]: Unable to connect to "" port 587.
May 17 14:43:10 VM004 sSMTP[31783]: Cannot open


Code: Select all
# Your email address

# Your Username | your password

# Address and port number to send mail to

# So the message appears to come from FAI | Hostname

# TLS | SSL/TLS Certificate

# RSA certificate.

Code: Select all

Code: Select all
# 'notify-host-by-email' command definition
define command{
   command_name   notify-host-by-email
   command_line   /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/sbin/sendmail.ssmtp -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
#/usr/sbin/sendmail.postfix sudo -s

# 'notify-service-by-email' command definition
define command{
   command_name   notify-service-by-email
   command_line   /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n $NOTIFICATIONCOMMENT$\n" | /usr/sbin/sendmail.ssmtp -s  "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

I have a centos 6.9 who run nagios core 4.1
Posts: 17
Joined: Wed Apr 05, 2017 3:18 am

Re: sSMTP : Cannot open

Postby dwhitfield » Wed May 17, 2017 9:47 am

This is not really a Nagios issue. You'll likely get a quicker resolution on the CentOS forums.

That said, ... mtp-server suggests you are using the wrong port #.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
The Doctor
Posts: 3956
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 16 guests