Day 11 - Checking SMTP Gateway Health
On the 11th day of Christmas, here's a script we use that's good for moving beyond the simple port check. This script connects to your SMTP gateway and then performs a string comparison against the server response data to determine service health. Really, this script could be modified to perform a check against any number of TCP-based services. This particular example is hard coded to port 25 to perform an SMTP check.
How it works: This example functions as follows:
PARAMETERS: Host - A single host NetBIOS, FQDN and IP okay Command - Send a command to the SMTP service on the server. If this command is left blank, then a simple port will run instead. SearchString - A search string will be used when a command is sent to the STMP server, otherwise this is ignored. LogSuccessEvent - 1 - log successful events, 0 - logs failure events
NOTE: that this script uses the FREE Toolsack Baseline COM objects which can be downloaded for free from http://www.arcticlabs.com. It comes as a Windows installer package (.msi). installation is a couple of clicks and has been stable everywhere I've used it.
WHERE TO GET IT: The SMTP Health Check Script can be downloaded at the URL below. http://www.momresources.org/momscripts/smtp_health_check.txt
|










Comments on "Day 11 - Checking SMTP Gateway Health"
post a comment links to this post