Author: Joachim Wieland Date: To: Edgar Lovecraft CC: exim-users Subject: Re: [Exim] launching "actions" on events
Hi Edgar,
On Fri, Apr 02, 2004 at 01:12:52AM -0600, Edgar Lovecraft wrote: > 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.
Ok, you might be right here but I see another problem:
- I do mail scanning by a separate daemon that receives mail via SMTP
from exim and sends it back to a special port after scanning (virus
and spam).
-> Here I also have to find the mail that got reinjected and I have to
link it to the original mail. Doing this just with the logfile is
impossible because the ID changes and other information is not unique
enough.
> Also, the exim log files are much more configurable about what
> information is logged than any other MTA I have ever used.
That's the next problem: Customer complains about something and I want
to log another option. Then I have to recheck my log parse scripts to see
if the regular expressions are still valid...
No, I don't really like to parse logfiles. Furthermore you have to keep
them open by the analyzing script or remember your position, deal with
rotation, with restart of the analyzing script and so on. If I had my
own logfile, I could rename it, analyze it and delete it when my
information went to the database successfully.
> > 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.
I'm sorry I don't understand...
> 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 ...).
Which means launching a separate program a few thousand times per hour.
I don't see the advantage.
> 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.
Maybe I should tell you that I'm already at the upper end of the
machine's capacity... I can't afford running perl scripts and I doubt
that embedded perl could compete with a builtin directive...
> 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 ;)
That's why I tried to propose changes that are quite general...