[Nagiosplug-devel] check_smtp: Syntax bug?

Saul, Markus Markus.Saul at danet.de
Mon Aug 28 17:01:34 CEST 2006

Hello dear developers,
today I faced a problem with the check_smtp plugin. I noticed that although I had given a wrong port number for a mail server the check returned an OK state and a normal response time. So I tried some things like placing characters in the command definition as the argument to the check command and it still said it was being ok.
Together with a colleague he discovered that there was a difference between the normally defined check_smtp command the custom defined check_command we used, namely "check_smtp_port".
The difference was:

check_smtp -H $HOSTADDRESS$
check_smtp_port $HOSTADDRESS$ -p $ARG1$

I had overseen the missing "-H".

So the command still worked although it was called like this: check_smtp mailserver -p 9999 assuming the default port 25 with an result in the likes of 
SMTP OK - 0.006 sec. response time|time=0.006449s;;;0.000000

I think that this might be a bug of the plugin itself, because it should complain about my syntax, if I forget the -H, as problems as mine above can arise from ignoring such user mistakes and just assuming the default value of port 25.
This is also hard to backtrack, so it would be good if there was some additional syntax check.

Thanks in advance,

	Markus Saul

i.A. Markus Saul
Data Center Appointee
Danet GmbH, Gutenbergstraße 10, 64331 Weiterstadt, Germany
Phone: +49 6151 868-698, Fax: +49 6151 868-
eMail: markus.saul at danet.de, URL: www.danet.com
Managing Board: Dr. Reiner Nickel (CEO), Dr. Burkhard Austermühl (CFO); Chairman of the Supervisory
Board: Jaques Bentz; Address of Record: Weiterstadt; Commercial Register: Amtsgericht Darmstadt HRB
6450; Tax Number: DE 172 993 071

More information about the Devel mailing list