Re: [exim-dev] [Bug 1031] Implement database logging of comp…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Axel Rau
Datum:  
To: Phil Pennock, exim-dev
Betreff: Re: [exim-dev] [Bug 1031] Implement database logging of completed remote delivery
Hi,

we talked about this on users and I submitted the patch last October:


Am 19.09.2010 um 22:01 Phil Pennock wrote:

> Patches welcome. Seriously, I don't object to logging to a DB, I just
> don't think it's wise as often as people try it. Sometimes it is.
>
> You'll need to consider what happens to debug logs, vs normal logs,
> and
> what sort of structure you want, but anything that's not hacky and is
> maintainable should be okay.


Meanwhile, I ported this to 4.73 and now to 4.74 (patch just uploaded).
My code is running in production with a PostgreSQL DB since last October
w/o problems, is not hacky and well documented. (-;
At least one more person is interested in it.

What can I do to get this included in 4.75?

From experimental-spec.txt:
----
DBL (Database Logging)
--------------------------------------------------------------

This feature allows to write exim internal log information
(not available otherwise) into a database.
Initially implemented is logging of details about successfully
completed remote deliveries, which are needed for reputation
systems.

In order to use DBL, you must set

EXPERIMENTAL_DBL=yes

in your Local/Makefile

and define the database query in the runtime config file, to
be executed at end of delivery using the new global option

dbl_delivery_query

Additionally, there are 4 more variables, available at end of
delivery:

dbl_delivery_ip             IP of host, which has accepted delivery
dbl_delivery_fqdn           FQDN of host, which has accepted delivery
dbl_delivery_local_part     local part of address being delivered
dbl_delivery_domain         domain part of address being delivered
dbl_delivery_confirmation   SMTP confirmation message


An example might look like:

dbl_delivery_query = \
${lookup pgsql {SELECT * FROM record_Delivery( \
     '${quote_pgsql:$sender_address_domain}',\
     '${quote_pgsql:${lc:$sender_address_local_part}}', \
     '${quote_pgsql:$dbl_delivery_domain}', \
     '${quote_pgsql:${lc:$dbl_delivery_local_part}}', \
     '${quote_pgsql:$dbl_delivery_ip}', \
     '${quote_pgsql:${lc:$dbl_delivery_fqdn}}', \
     '${quote_pgsql:$message_exim_id}')}}


(main option part of runtime config)
--------------------------------------------------------------

Axel
---
axel.rau@??? PGP-Key:29E99DD6 +49 151 2300 9283 computing @
chaos claudius