On Thu, 2004-04-29 at 17:09, Development - multi.art.studio wrote:
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Hello Philip,
>
> Philip Hazel wrote:
>
> >On Wed, 28 Apr 2004, Development - multi.art.studio wrote:
> >
> >
> >2. You can write a program/script that "tails" the log file. It is then
> >fully up-to-date.
> >
> >
> >
> yes, i will try it, maybe with a simple shellscript.
> but imho tailing the log may not get all data, e.g. if the tailscript
> isnt running, or logrotate flushs the files.
> in this case cronjobs may possible to manage but one mistake in the
> order of scripts would break it.
> and would tailing and grepping with complex filters not be slower than
> just dumping out the messagesize to a file?
There is a perl library you may find helpful: File::Tail. There used to
be a popb4smtp.pl script out there that I found useful for such things.
It seems that the owner of it has lost his webspace. I have a copy if
you would like to see it. I was able to modify it to use a db backend
instead of just touching files so it can be used in a multi-server
environment. I can send those modifications as well if you are
interested.
--
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com