======================================================================== Table of Contents ----------------- 1. What is Read_file_smtp_sog.vbs 2. what to edit before running the script 3. About Read_file_smtp_sog.vbs 4. Rev. of Read_file_smtp_sog.vbs 5. Need to be don!!! 6. bugs 7. Warning 8. do you like it ? 9. Contacting me 10. Thank to ========================================================================== 1. What is Read_file_smtp_sog.vbs -------------------------------------------- Is a script to read the log files from mailsweeper 4.x and look for relay attempts and then Email the infomation to the mail admin ok here we go !!! how do it work in shot txt First time the script run on a new day 1 it read from line 1 and down 2 scan for relay attampt and copy it in a array 3 if relay attampt is found then it make som output to con or/and Email 4 save the linenumber of the last line it read this time in the reg. Next time the script run on the same day 1 read reg. info from lastrun 2 it skip all the lines it read last time 3 it then read the new log entry 4 scan the new lines for relay atampt 5 if relay attampt is found then it make som output to con or/and Email 4 save the linenumber of the last line it read this time in the reg. If the script end in a error it well reset and allways run like it the first time the script run on a new day and do so until the error is found or removet ========================================================================== 2. what to edit before running the script -------------------------------------------- turn on SMTP logging in Mailsweeper before it well make some log filers yes it slow down mailsweeper a little to make the log files if you dont wont this you kan Email me to get a version ther read eventlog on windows 2k/net server but this script is i beta Lines in the script is you need to change before the script can run the script is reading the files in this folder and the files is having names like OPR20020425.log is the logfile from the 25/4-2002 the default folder mailsweeper do use is c:\Program Files\MAILsweeper for SMTP\Spool\logs\ logdir = "c:\scripts\msw\smtp\" To be some working email at you plase, i dont wont your Email's your need to config 'MS outlook express' whit a accont ther can get and send mail from some mail server, becuse the CDO is use it's config MailMsg.To = "tooms@post1.tele.dk" MailMsg.From = "tooms@post1.tele.dk" ========================================================================== 3. About Read_file_smtp_sog.vbs -------------------------------------------- when Mailsweeper not have the option to alart administrator when some one is trying to relay mails on his system, I build this script to do it and it is free for you to use and edit. but if you change some of the code, you must email the code and some info on why, so i can put it in the script and we all can use it ========================================================================== 4. Rev. of Read_file_smtp_sog.vbs -------------------------------------------- 1.2002.08.24 * change output Email from plain text to HTML (to get nice Email output) * some clean up the script * small bug 1.2002.05.02 * Resize the input and output array is now working on the fly, so it dont get index error * how to run/install is add in how_to_run.txt 1.2002.04.30 * change "<<< 501" to search for "<<< 501" and "relay" so it can get all the error 1.2002.04.29 * change "<<< 501 5.1" to "<<< 501" (to get all relay error) * more txt to the readme file * small clean up in the script * more comment lines in the script 1.2002.04.28 * add this readme file * Email funktion is working now (cdo.Message) * clean op some code to speed up the script * checks for errors and do some thing if a error is found 1.2002.04.26 * Is the first clend working version 0.0.0.1B DONT USE IT....... it very very very beta code ========================================================================== 5. Need to be don!!! -------------------------------------------- * mybe a version for database * break long lines in to more lines (some formatting) ========================================================================== 6. bugs -------------------------------------------- * the script is not always removing space lines ? ========================================================================== 7. Warning -------------------------------------------- it is up to you.... testing testing testing before use !!!!!!!!!!!! not me I have only teste it on windows 2000 pro and server ========================================================================== 8. do you like it ? -------------------------------------------- please giv me some feedback, also if ther is things you dont like ========================================================================== 9. Contacting me -------------------------------------------- Name: Thomas B. Johansen Email: Tooms(remove_this)@post.tele.dk WWW: http://home1.inet.tele.dk/tooms/ ========================================================================== 10. Thank to -------------------------------------------- From Denmark: René Rise