Re: [exim] insert sql from acl

Página Inicial
Delete this message
Reply to this message
Autor: Magnus Holmgren
Data:  
Para: Rory Campbell-Lange, exim-users
Assunto: Re: [exim] insert sql from acl
On Tuesday 27 June 2006 18:01, Rory Campbell-Lange took the opportunity to
write:
> I wish to run an sql insert from the acl section of the following test
> configuration. Postgresql is not showing any connection attempts; exim is
> compiled with postgres support. Mail delivery itself operates as expected.


Well, you must reference acl_insert somewhere; ACLs don't get run by
themselves like routers do. Typically you'd set acl_smtp_data = acl_insert to
test, but more probably you'll want to add an acl = acl_insert call in the
normal acl_smtp_data ACL.

> INSERT_SQL = INSERT INTO test \
>              (t_message_id, t_path, t_date, t_subject, t_recipients, \
>               t_from, t_to, t_cc, n_message_size) \
>              VALUES \
>              ('${quote_pgsql:$message_id}', \
>               '${quote_pgsql:${length_10:$tod_log}/${message_id}}',  \
>               '${quote_pgsql:$h_date}',  \
>               '${quote_pgsql:$h_subject}',  \
>               '${quote_pgsql:$recipients}',  \
>               '${quote_pgsql:$h_from}',  \
>               '${quote_pgsql:$h_to}',  \
>               '${quote_pgsql:$h_cc}',  \
>               '${quote_pgsql:$message_size}')

>
> ######################################################################
> #                       acl configuration                            #
> ######################################################################
> begin acl

>
>   acl_insert:
>          warn condition = ${lookup pgsql{INSERT_SQL}}


-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)