[exim] insert sql from acl

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Rory Campbell-Lange
Dátum:  
Címzett: exim-users
Tárgy: [exim] insert sql from acl
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.

Thanks for any tips
Rory

######################################################################
#                       main configuration                           #
######################################################################


exim_path = /usr/sbin/exim4
domainlist local_domains = @:localhost
domainlist relay_to_domains = *
hostlist relay_from_hosts = 10.0.0.0/24 : 127.0.0.1 : ::::1
hide pgsql_servers = localhost/test/test/testpass
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
spool_directory = /var/spool/exim4
gecos_pattern = ^([^,:]*)
gecos_name = $1

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}}


######################################################################
#                      routers configuration                         #
######################################################################


begin routers

test:
debug_print = "R: test for $local_part@$domain"
driver = accept
transport = test_transport

######################################################################
#                      transport configuration                       #
######################################################################


begin transports

test_transport:
debug_print = "T: test_transport for $local_part@$domain"
driver = appendfile
user = test
group = test
mode = 0660
envelope_to_add = true
return_path_add = true
file = /test/store/${length_10:$tod_log}/${message_id}

begin retry

# Address or Domain    Error       Retries
# -----------------    -----       -------


*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h


begin rewrite

begin authenticators


--
Rory Campbell-Lange
<rory@???>
<www.campbell-lange.net>