[Nagiosplug-devel] [ nagiosplug-Feature Requests-3182587 ] check_smtp handle non-220 code in the connect string cleanly

SourceForge.net noreply at sourceforge.net
Tue Feb 15 19:11:32 CET 2011


Feature Requests item #3182587, was opened at 2011-02-15 18:11
Message generated for change (Tracker Item Submitted) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3182587&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Daniel Piddock ()
Assigned to: Nobody/Anonymous (nobody)
Summary: check_smtp handle non-220 code in the connect string cleanly

Initial Comment:
Plugin Version (-V output): check_smtp v1.4.15 (nagios-plugins 1.4.15)
Plugin Name: check_smtp
Operating System: Debian Lenny (Lenny-Backports)
Architecture: amd64
Compiler: gcc-4.3

I am attempting to monitor an smtp server that returns "451 local error" in the connect string before closing the connection.

check_smtp reads the string, notes that it does not contain the expect string (220), sets WARNING and blindly stumbles on with sending EHLO. Then fails with "recv() failed". If I set the expected string to 451 I still end up with a WARNING as EHLO failed.

Attaching a patch that checks whether the connect string contains 220 before sending EHLO. Will return OK if the connect string matches expected string.

I realize this is a slightly odd edge case.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3182587&group_id=29880




More information about the Devel mailing list