All,
Someone, a long time ago, mentioned a problem dealing with the large log files. I use a Perl script to "Archive" the log file at noon using the windows scheduler so that I end up with 2 logs / 24 hour period. It is super simple and makes no "open file" checks so it could fail to archive if SpamFilter is writing to the file at that moment. However, after 3 months of running, this has never happened.
NO TECH SUPPORT on this script! Too simple!
Regards,
Dan S.
#SpamFilter Log File Archicing For WIN NT #Aug. 6 2004 Dan Seligmann, Mags Net LLC
#Get the Current Date &get_date();
#Archive The Log File $Path = "d:\\SpamFilterISP\\logfiles"; $FullName = "$Path\\$ActiveFile";
system("rename $FullName $NewFile");
#This function gets the date and time then formats it correctly sub get_date {
# Define arrays for the day of the week and month of the year. # @days = ('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); @months = ('January','February','March','April','May','June','July', 'August','September','October','November','December');
# Get the current time and format the hour, minutes and seconds. Add # # 1900 to the year to get the full 4 digit year. # ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6]; $time = sprintf("%02d-%02d-%02d",$hour,$min,$sec); $year += 1900; $dom = sprintf("%02d",$mday);
# Format the date.
$mon++;
$Suf = "a"; $date = "$mon-$mday-$year-$time"; $ActiveFile = "$year$mon$dom.log"; $NewFile = "$year$mon$dom$Suf.log"; }
|