Nagios checking Microsoft Exchange SMTP

Subhendu Ghosh sghosh at sghosh.org
Thu Oct 31 16:48:34 CET 2002


On 31 Oct 2002, Karl DeBisschop wrote:

> On Thu, 2002-10-31 at 09:56, Subhendu Ghosh wrote:
> > if you are using check_smtp
> > 
> > 1. make sure your source has "QUIT\r\n"
> > 2. use the -f option so Exchange does not go into a wait mode in closing 
> > the connection.
> 
> I was reading item 2 above and looking at the code. If the mail server
> software hasn't disguised itself, don't we know it fron the initial
> response? (that is before the from_srt is sent?)
> 
> If so, can't we create and send a generic from command and send it by
> default when we see that we're dealing with exchange? Actually, it looks
> like we always send the from string, even if it's null, which seems
> pointless.
> 
> Sorry if I'm being stupid here, or this has been covered already, but
> I'm not a mail guru, and between work and kids, I don't get to read
> every message on the list. But it seems that there's some cleanup left
> in check_smtp from a usability point of view.
> 

Well the whole intent of item 2 was to create a fully formed MAIL command.

Most of the *nix based MTA's will accept a "MAIL \r\n" even though it is
not a complete command from an RFC standpoint.  Exchange and Dominio (I
think) want a complete "MAIL FROM: from at host\r\n" otherwise they refuse to
accept the next command "QUIT \r\n" and hang on to the TCP connection.

The half mail command was introduced to prevent sendmail and other from 
logging "connected but no command messages".


I thinks we should try to be RFC compliant and have the following sequence 
in checking smtp by defualt:

HELO
MAIL FROM: nagios at localhost
QUIT



The option for -f would allow the user to substitute another addres for 
"nagios at localhost" to allow easy parsing out of relevant records.


Add a unix/sendmail specific option that sends half the MAIL command (and 
generates no log entries).

-- 
-sg



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en




More information about the Users mailing list