Re: [exim] Running a SQL Insert command

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users @ exim. org
Subject: Re: [exim] Running a SQL Insert command
Michael da Silva Pereira wrote:
> Hi all,
>
> How would a run a sql query in an acl? I want to log all my mails into a sql database, i was thinking a condition might work, but i also want to log my denied mails so I am scared it might cause a problem no returning a value(since its an insert query it has no output).



add_to_watchlist:
   warn   set acl_m9 =   ${lookup pgsql{ BEGIN; \
                         DELETE FROM helo_chk \
                             WHERE ip = 
'${quote_pgsql:$sender_host_address}' \
                             AND helo = 
'${quote_pgsql:$sender_helo_name}' ; \
                         INSERT INTO helo_chk(ip,helo) \
                                 VALUES( 
'${quote_pgsql:$sender_host_address}', \


'${quote_pgsql:$sender_helo_name}' ) ; \
                         COMMIT } {} { \
                         }}