Hi Daniel,

thanks for taking the time reporting the bug.

On Thursday, 3. February 2011, Daniel Piddock wrote:
> The check_smtp program will blindly send a EHLO/HELO line after getting
> a connection message without paying attention to the response code. If
> the response code indicated a non-OK state, check_smtp should handle it
> cleanly instead of falling over later with "recv() failed" and quitting
> with WARNING code.

Indeed. I was going into contact with upstream about it and the problem should 
be fixed[1]. I included the patch into our package.

> This is an edge use case. I want to monitor a smtp server that returns
> "451 local error" after connecting.
> 
> Patch attached checks that the response does not contain "220" before
> comparing against any -e argument. If -e does not match, print a message
> and set return code to WARNING. Either way, return and don't send more
> data to the server.

You patch looks a bit weird about that and I won't adopt that into our 
package. It would be nice if you could send you feature request upstream[2].

Many thanks, Jan.
[1] 
http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commitdiff_plain;h=d16f3fb0a9bb37cc1ce73ef14b5de83e907ef23c
[2] http://sourceforge.net/tracker/?group_id=29880&atid=397600
-- 
Never write mail to <w...@spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++ 
------END GEEK CODE BLOCK------

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to