SERVPING and SERVDOWN are two batch files that are meant to be run as scheduled tasks that will notify you if a server listed is the servers.txt file is down.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
SERVDOWN.BAT
SERVPING.BAT
blat.exe
servers.txt
settings.ini

README

:: Author:  Steven R. Stepp
:: Created: 03/28/2011
:: TESTED ON - Windows 7 Professional 64-bit

SERVPING and SERVDOWN are two batch files that are meant to be run as 
scheduled tasks that will notify you if a server listed is the servers.txt 
file is down.

REQUIREMENT: you must have a copy of "blat.exe" in the same folder as both 
             SERVPING.BAT and SERVDOWN.BAT

FILES:

	servers.txt  - Text file containing the IP address and a name for the 
	               server to check for being down. One server per line, 
				   IP address list first, then the name with one space 
				   separating them.
				   
	               Example:        192.168.0.1 MainServer
				                   192.168.0.2 BackupServer
								   
	down.txt     - Text file that contains the currently down servers. This 
	               file is auto-generated and auto-maintained.
	
	notify.txt   - A temporary text file used during processing and deleted 
	               once finished.
	
	settings.ini - Text file that contains the settings for email accounts.
	
	SERVPING.BAT - Batch file meant to be run frequently, say once every few 
	               minutes, that will check the list of servers in servers.txt
  				   to see if any are currently down, and if so add the server 
				   to the down.txt file. The initial email to the user will be 
				   sent as soon as the batch files and identifies the server is
				   down.
	
	SERVDOWN.BAT - Batch file meant to be fun once a day that will re-verify
                   the servers listed in down.txt are still down. If so, an 
				   email will be sent to the user. If not, the server is 
				   removed from the down.txt list.
				   
				   
STUNNEL config to work with GMAIL
---------------------------------
	; some debugging stuff useful for troubleshooting
	debug = 7
	output = stunnel.log

	client = yes

	[imaps]
	accept = 143
	connect = imaps.gmail.com:993

	[ssmtp]
	accept = 25
	connect = smtp.gmail.com:465


How to register STUNNEL as a Service on Windows
-----------------------------------------------
In the install folder for stunnel that contains the "stunnel.conf" file:
	stunnel -install


BLAT setup for STUNNEL through GMAIL
------------------------------------
	blat -install server_ip email@address.com@127.0.0.1:1109
	ex.   blat -install 192.168.0.21 me@mydomain.com@127.0.0.1:1109


Test Batch File for BLAT
------------------------
@echo off
blat - -body "The test was completed successfully." -to senduser@senderdomain.com -subject "Blat Test Successful" -server localhost -p smtp -u me@mydomain.com -pw mypassword