Re: [exim] Log stats to DB?

Góra strony
Delete this message
Reply to this message
Autor: Ted Cooper
Data:  
Dla: exim-users
Temat: Re: [exim] Log stats to DB?
D. Dante Lorenso wrote:
> All,
>
> Can someone share an Exim rule that will allow me to log statistics to a
> database? I want to log the number of messages sent to/from a given
> user, total messages sent through server, and other various data.
>
> I've got Exim connected to PostgreSQL currently and can do queries
> inside routers / transports etc to qualify 'senders =' and lookup data
> with 'data =', but I haven't figured out how to just exec a query for
> the purpose of simply logging.
>
> Any pointers would be appreciated. Using Exim 4.63 here.


warn continue ${lookup mysql{insert into whatever (col) values(blip)}}

Not too sure what version that was added though. If you don't have the
continue condition/command/thingy, you can always just fill a variable
with crud.

warn set acl_m_moomoo ${lookup ...

Maybe do conditions

warn condition = ${if {in the manual}{$everything}{yes}{no}}
     continue  = ${lookup mysql{insert whatever}}


Is there a really good reason to use an old version? There's nothing
between 4.63 and 4.68 (in a few days+) that could cause a configuration
conflict.

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html