The page https://www.baruwa.org/docs/2.0/mta/exim.html explains how to
let exim log deliveries to the database, however the options mentioned
there are outdated.
I recompiled exim 4.82 from source with the EXPERIMENTAL_TPDA=yes and
changed the exim.conf as follows:

hide pgsql_servers = baruwa-db-server/baruwa-db/baruwa-user/baruwa-password

DELIVERY_ACTION = ${lookup pgsql \
        {INSERT INTO messagestatus (messageid, hostname, ipaddress,
port, confirmation) \
    VALUES('${quote_pgsql:$message_exim_id}',
'${quote_pgsql:$tpda_delivery_fqdn}', \
        '${quote_pgsql:$tpda_delivery_ip}', \
    ${quote_pgsql:$tpda_delivery_port},
'${quote_pgsql:$tpda_delivery_confirmation}')}}
DEFER_ACTION = ${lookup pgsql {INSERT INTO messagestatus (messageid,
hostname, ipaddress,\
        port, confirmation, errorno, errorstr) \
        VALUES('${quote_pgsql:$message_exim_id}',
'${quote_pgsql:$tpda_delivery_fqdn}',\
         '${quote_pgsql:$tpda_delivery_ip}',
${quote_pgsql:$tpda_delivery_port},\
         '${quote_pgsql:$tpda_delivery_confirmation}',
${quote_pgsql:$tpda_defer_errno}, \
        '${quote_pgsql:$tpda_defer_errstr}')}}

remote_smtp:
  driver = smtp
  tpda_delivery_action = DELIVERY_ACTION
  tpda_host_defer_action = DEFER_ACTION

Regards
Andreas


_______________________________________________
http://pledgie.com/campaigns/12056

Reply via email to