You are here:
ActiveXperts.com > Support > ActiveXperts Network Monitor > Online > Linux > SMTP server
Quicklinks
The following script can be used in ActiveXperts Network Monitor to check an SMTP mail server on a remote LINUX machine:
################################################################################# # ActiveXperts Network Monitor - shell script checks # © 1999-2008, ActiveXperts Software B.V. # # For more information about ActiveXperts Network Monitor and SSH, please # visit the online ActiveXperts Network Monitor Shell Script Guidelines at: # http://www.activexperts.com/support/network-monitor/online/linux/ ################################################################################# #!/bin/sh # Validate number of arguments if [ $# -ne 1 ] ; then echo "UNCERTAIN: Invalid number of arguments Usage: smtp_server" exit 1 fi #Checks the connection sleep 1 | nc $1 25 2>&1 | awk ' { if ( $1 == "220") printf( "SUCCESS: SMTP server is available, response=[%s] DATA: 1\r\n", $0 ); else printf( "ERROR: SMTP server is not available, response=[%s] DATA: 1\r\n", $0 ); }';