> send more than 5 mails pr minute (spams) and if so, get Python to
send a
> warningmail to the mailmaster.
>
> How would I in the best way read the log?
Using the standard file methods...
> To open the file and close it
> every second sounds like a bad idea?
It would be but you don't need to, y
You could just get Python to see if the maillog has increased in size,
and if so then open it, or you could get the 'last modified date' and
so forth... os module will do this.
Or, all changes to the maillog could be passed through Python, which writes it?
http://www.python.org/doc/2.3/lib/module-
I would like to analyze a maillog. The maillog is automatically generated
and every mail sent is added to the log. I would like to check if someone
send more than 5 mails pr minute (spams) and if so, get Python to send a
warningmail to the mailmaster.
How would I in the best way read the log? To o