Autor: Edgar Lovecraft Data: Para: exim-users Assunto: Re: [Exim] launching "actions" on events
Joachim Wieland wrote: >
> As some other poster wanted to do recently, I'd like to collect some
> statistics about mails (how long they were on the queue, where they went
> to, when they got delivered, where they got delivered to...) for a
> database-driven tracability so I'd favor a logging that is more easy to
> parse and more concise than the mainlog file.
These are easily parsed, just as easily parsed as sendmail logs, I always
did like the delay= and xdelay= information though ;) but it is available
with exim as well, it just requires a touch of calculation. Also, the exim
log files are much more configurable about what information is logged than
any other MTA I have ever used.
> Are there any suggestions on how to do that most easily?
>
> I thought about it and I would favour the following solution so far:
> - I'll patch exim and add the following generic options for transports:
> action_delivery = ...
> action_defer = ...
> action_bounce = ...
> ...
>
This information is already there, if you want all of it in one log file,
then use syslog and turn off log duplication for example.
As for all of your "logwrite" functions (which I snip sniped), you can
always do a 'run' expansion and pipe the info into whatever program you
wish (logger, or echo, or mail, or ...). Another possibility is to just
make use if the 'log_write' and 'warn' statments already in Exim and just
look for those entries, or compile in PERL support and pass the information
you want to track directly to a custom PERL script.
The great thing about Exim is that you can do all of this, and many other
things to suit your purposes. At times, this can be a downside as well,
because if you want something that someone else has setup for thier use, it
does not always port over to your use very well, unless you want to let
that person control how your system works too ;)