Re: [exim] BerkeleyDB in ACL or transport

Pàgina inicial
Delete this message
Reply to this message
Autor: Peter Bowyer
Data:  
A: exim-users
Assumpte: Re: [exim] BerkeleyDB in ACL or transport
David Cannings <lists@???> wrote:
> On Thursday 02 September 2004 15:45, Peter Bowyer wrote:
>> David Cannings said:
>>> Is there any way to get Exim to open a BerkeleyDB and increment a
>>> value in it inside an ACL or transport? I currently keep track of
>>> other statistics in a similar way for HTTP using a custom logging
>>> script and rrd.
>>> If somebody could suggest a simple way to update the count I would
>>> be very grateful.
>> I don't believe there's a way to achieve this in native Exim, but you
>> can use a ${run expansion in an ACL or a router to call an external
>> prog/script to do the job... or a ${readsocket to communicate with a
>> daemon.
>
> Thanks, I hadn't thought of running an external command. How
> expensive would that be considering system-resources if a shell
> script was run and a value incremented for each mail received? I'm
> considering graphing amount of spam/virii/delivered mail that is
> received into a production server.


Quite high probably. Exim doesn't run a shell by itself - if you need one,
you'd have to call it explicitly, so a small C program would be much less
expensive than a shell script. There's always the built-in perl option, too.

I'm experimenting with a ${readsocket call for logging stats, with a daemon
listening on the socket that scribbles in MySQL tables. I've not
stress-tested it in production, though, and I'm expecting it to be
medium-expensive.

Peter