Title: SMTP Monitoring
Dave,
 
Was looking at some old email and found this thread.
Are you still looking for something to test SNMP and delivery to a POP3 mailbox?
 
I wrote a pair of monitors some time back (maybe you were the inspiration) that seemed to do the job when the net admins here were having similar trouble with a mail server. They may need some customization for your server (these were written for an IMail server, a beta version, at that...).
 
The first, the SMTP Send monitor, will connect to a server, build and send an email message to a specific user. The second, a POP3 mailbox check, is a bit more sophisticated, it checks for the number of messages and only if 1 or 2, says it is OK. It also deletes messages, so the mailbox should never have too many in it (if you stop this monitor, but leave the SMTP send running, you get 1 new message every poll interval!).
 
Daniel Donnelly
 
Copy the existing SMTP monitor and rename, then paste this in (plain text) and modify as needed:
#Designed with IMail Server.
# Change the hostname of the server to match yours.
#Response upon SMTP port connection, "220" is probably enough.
SimpleExpect=220 ipswitch.com
#Say hello to SMTP server (replace HELO with EHLO for ESMTP.
Send=HELO whatsup.ipswitch.com\r\n
#Response from EHLO command, "250" is probably enough.
SimpleExpect=250 hello ipswitch.com
#Begin message construction, envelope first.
Send=MAIL FROM: [EMAIL PROTECTED]
#Response from FROM command, "250" is probably enough.
SimpleExpect=250 ok
Send=RCPT TO: [EMAIL PROTECTED]
#Response from RCPT command, "250" is probably enough.
SimpleExpect=250 ok its for <[EMAIL PROTECTED]>
Send=DATA\r\n
#Response from DATA command, "354" is probably enough.
SimpleExpect=354 ok, send it; end with <CRLF>.<CRLF>
#Subject: Line
Send=subject: Test\r\n
#End header info
Send=\r\n
#Send body contents.
Send=This is a test.\r\n
#Terminate message
Send=.\r\n
#Response from terminate command, "250" is probably enough.
SimpleExpect=250 Message queued
#Terminate connection
Send=QUIT\r\n
#Response from QUIT command, "221" is probably enough.
SimpleExpect=221 Goodbye
 
 
Copy the POP3 monitor and rename and paste this:
#Designed with IMail Server.
# Modify the "Expect" responses for your server.
# EXPECT Response from POP3 port, "+OK" is probably enough.
Expect=+OK X1 NT-POP3
#Start login process with USER command & username (test)
#Replace username/password with those of an active account.
Send=USER test\r\n
Expect=+OK send your password
#Continue with PASS command & password (test)
Send=PASS test\r\n
Expect=+OK maildrop locked and ready
#Login complete, begin check for number of messages
:CHK0
#Are there no (0) messages?
Send=LIST\r\n
Expect=+OK 0 messages
#Checks for good/bad response and jumps to routine to handle
IfState OK Done
IfState ERR CHK1
:CHK1
#Is there just 1 message?
Send=LIST\r\n
Expect=+OK 1 messages
#Checks for good/bad response and jumps to routine to handle
IfState OK OneMSG
IfState ERR CHK2
:CHK2
# Are there 2 messages?
Send=LIST\r\n
Expect=+OK 2 messages
#Checks for good/bad response and jumps to routine to handle
IfState OK TwoMSG
IfState ERR CHK3
:CHK3
# Are there less than 10 messages?
Send=LIST\r\n
Expect=\+OK \d messages
#Checks for valid response and jumps to routine to handle
IfState OK 2ManyMSG
IfState ERR Done
:OneMSG
#Handler for 1 message in mailbox, deletes the
# message and exit with Good status
Send=DELE 1\r\n
Expect=+OK msg deleted
Send=QUIT\r\n
Expect=+OK POP3 Server saying Good-Bye
Exit OK
:TwoMSG
#Handler for 2 messages in mailbox, deletes the
# messages and exit with Good status
Send=DELE 1\r\n
Expect=+OK msg deleted
Send=DELE 2\r\n
Expect=+OK msg deleted
Send=QUIT\r\n
Expect=+OK POP3 Server saying Good-Bye
Exit OK
:2ManyMSG
#Handler for too many message in mailbox,
# deletes up to 4 messages
Send=DELE 1\r\n
Expect=+OK msg deleted
Send=DELE 2\r\n
Expect=+OK msg deleted
Send=DELE 3\r\n
Expect=+OK msg deleted
IfState ERR Done
Send=DELE 4\r\n
Expect=+OK msg deleted
Goto Done
:Done
#Close POP3 connection and Exit with Bad status
Send=QUIT\r\n
Expect=+OK POP3 Server saying Good-Bye
Exit ERR
 
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Patterson
Sent: Tuesday, February 15, 2005 12:10 PM
To: [email protected]
Subject: RE: [WhatsUp Forum] SMTP Monitoring

Hi Dave,

 

I think this would be an awesome opportunity for Ipswitch.  In the mean time, there is a tool that was built with WhatsUp in mind that will do much of what you want:
http://www.bekarts.com/mailshappy/bimail.html

 

Have fun,

 

Michael Patterson

(207)324-8805

Check out Logalot for WhatsUp: http://www.somix.com/products/logalot_whatsup.php

[EMAIL PROTECTED]

 

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Morrow
Sent: Tuesday, February 15, 2005 10:44 AM
To: [email protected]
Subject: [WhatsUp Forum] SMTP Monitoring

 

Hi all.  I have posed this question to several lists, but have not gotten the solution I am looking for as yet.

From an SMTP (email) perspective I have 2 domains in 2 locations.  On occasion, email traffic between these domains has slowed or even stopped for a period of time.

I am looking for a tool which can ;

1. Monitor that SMTP email is getting from point A to point B.
2. Tell me how long messages are taking to get from point A to point B.

David A. Morrow
Technical Systems Lead
Autodata Solutions Company
[EMAIL PROTECTED]
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615 

< Poor planning on your part does not necessarily constitute an emergency on my part. >

This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

Reply via email to