[exim-dev] [Bug 1031] Implement database logging of complete…

Góra strony
Delete this message
Reply to this message
Autor: Axel Rau
Data:  
Dla: exim-dev
Temat: [exim-dev] [Bug 1031] Implement database logging of completed remote delivery
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1031




--- Comment #2 from Axel Rau <axel.rau@???> 2010-10-15 19:04:40 ---
Am 15.10.2010 um 17:41 schrieb Todd Lyons:

> In the example in the patch, you put a SELECT statement, but it seems
> like it would be better illustrated by showing a sample INSERT
> instead:
>
> +An example might look like:
> +
> +dbl_delivery_query = \
> +${lookup pgsql {SELECT * FROM record_Delivery( \
> +    '${quote_pgsql:$sender_address_domain}',\
> <snip>

>
> Because that record doesn't exist yet, right?

My example uses a stored procedure. A real world example with a  
normalized
schema would be quite complex, because a couple of tables would be  
queried/
updated/inserted.
A simple INSERT might look like:
-----------
dbl_delivery_query = \
${lookup pgsql {INSERT INTO record_Delivery( \
      sa_d, sa_lp, ra_d, ra_lp, rel_ip, rel_fqdn, msg_id) \
      VALUES ('${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}')}}
-----------


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


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email