Re: [Exim] question about smtp-traffic

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Yves Goergen
Data:  
Para: Development - multi.art.studio
CC: exim-users
Assunto: Re: [Exim] question about smtp-traffic
On 29.04.2004 23:09 (+0200), Development - multi.art.studio wrote:
> Philip Hazel 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?


Philip must have meant tailing in the -f style. That is, you write a
programme that waits on the file for new data to be read and processes
it as it's written to the file. This tool would read the entire logfile
once and stop at the end, waiting for more log lines. (Just try "tail
-f"ing your Apache access log while surfing your website...)

I would have to combine this with storing the message IDs in some way
and decide when to count this delivery, and whether for one or two
users. But I see two problems with this for now:

1) How long should I store the message ID entries? Can I rely on a
"Completed" message to be written? What about frozen messages that were
never actually delivered?

2) How can I determine what log lines were already processed, when the
parser is restarted? Maybe I'd have to note the date anywhere and only
count traffic logged after this date.

--
Yves Goergen <nospam.list@???>

BlackBoard Internet Newsboard System --> blackboard.unclassified.de
Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)