[Pkg-nagios-devel] Bug#611914: nagios-plugins-basic: check_smtp blindly sends HELO no matter how the server responds to connection

Daniel Piddock dgp at corefiling.com
Thu Feb 3 17:01:44 UTC 2011


Package: nagios-plugins-basic
Version: 1.4.15-3~bpo50+2
Severity: normal
Tags: patch

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.

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.

-- System Information:
Debian Release: 5.0.8
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nagios-plugins-basic depends on:
ii  iputils-ping         3:20071127-1+lenny1 Tools to test the
reachability of
ii  libc6                2.7-18lenny7        GNU C Library: Shared libraries
ii  libssl0.9.8          0.9.8g-15+lenny11   SSL shared libraries
ii  procps               1:3.2.7-11          /proc file system utilities
ii  ucf                  3.0016              Update Configuration File:
preserv

nagios-plugins-basic recommends no packages.

Versions of packages nagios-plugins-basic suggests:
ii  nagios3                   3.0.6-4~lenny2 A host/service/network
monitoring

-- no debconf information

-- 
Daniel Piddock, Systems Administrator, CoreFiling Limited
http://www.corefiling.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_smtp.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20110203/1bab4d88/attachment.txt>


More information about the Pkg-nagios-devel mailing list