>On 22-Oct-08, at 10:04 AM, Eric Shubert wrote:

>>>>I believe that log rotation is based not on date/time but on file size and that the max log file size is set in /var/qmail/control/ logsize.


>>>That seems to be correct, as all my logs (old) are 975K.
>>>Would it be considered a bad move to change the log rotation to a time period (if this is even possible)?

>Yes. I don't think it's easily done.

>>>Or I guess I could (and should) just write a script to parse for the current date with the tai64nlocal tool.

>I'd go this route. The qmlog script does some date processing, and might be useful (using -nl option?) as a front end to the stats program. I don't think it'd give you precise date boundaries though. You might consider enhancing qmlog to do this.

>>>Thanks.
>>>DNK


--
>>-Eric 'shubes'

---------------------

I had already decided and went this route. I got it working, but with my method, I too experience the inaccurate precise date boundaries (due to the files changing based on size and not date). But this is ok for me as I just want a general over view of my spamdyke stats. My machine is really quiet between 11pm and 6 am (since my mailserver is business and not ISP related). So my users tend to not be on then.....

I had considered modifying the qmlog, but my shell script coding practices are not very neat (IE I tend to use a lot of tmp files to hold data, and delete at the end after I clean my data through each process), and did not want to muck their stuff up (yet). I just whipped something together that works (for now), and will likely see what I can do with qmlog later).

Although if anyone is interested, I will gladly hand over the script(s) if they are interested in getting their stats for spamdyke based more so on a daily overview as opposed to the current log file. Just keep in mind, my thrown together way is probably not optimal bash coding. Just gets the job done.

It consists of the actual spamdyle stats perl script, and small script that creates a list of log files to parse based on todays date, and an actual run script that builds the report and emails it to an admin (this is the one to cron).



Just fire me an email off list.

--
Dustin



---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to