Page 1 of 1

send email

Posted: Wed Aug 01, 2012 4:07 am
by inserm
hello
I tested the sending of email I added the following to the file localhost.cfg
define service {

use local-service
host_name localhost
service_description SMTP Response Check
check_command check_smtp! 5-t-e "my email address"
}
but I like error: Invalid SMTP response received from host: 220 ESMTP Exim 4.72

Re: send email

Posted: Wed Aug 01, 2012 9:47 am
by nscott
The -e that you're giving it is the expect string, which you are telling it is "my email address", but its returning "220 ESMTP Exim 4.72". Try defining the command as follows:

Code: Select all

use local-service
host_name localhost
service_description SMTP Response Check
check_command check_smtp!-t 5
}

Re: send email

Posted: Thu Aug 02, 2012 3:28 am
by inserm
I tried with this:

Code: Select all

define service{
    use            			local-service	
    host_name        			localhost
    service_description    		SMTP Response Check
    check_command        		check_smtp!-t 5 -e "my_email_address"
    }
he displays a warning: Invalid SMTP response received from host: 220 "my_email_address" ESMTP Postfix (Debian / GNU)

Re: send email

Posted: Thu Aug 02, 2012 10:29 am
by nscott
The -e whats tripping you up in this command. When the plugin connects tot he mail server, the string its expecting is "my_email_address", and its getting a the wrong string back in return.