[exim] How to Log rejects to MySQL

Top Page
Delete this message
Reply to this message
Author: Rick Duval
Date:  
To: exim users
Subject: [exim] How to Log rejects to MySQL
I'm using Exim with MailScanner in a gateway configuration. I use this
simple lookup code to decide what to keep and what to reject:

 accept  condition = ${lookup mysql{SELECT count(*) from addresses \
                       WHERE domain='${quote_mysql:$domain}' \
                       AND local_part='${quote_mysql:$local_part}' \
                       AND accept_email='1'}}


deny



I'd like to log the rejects to a MySQL table but I'm not sure how to do it.
Also, what variables are available for me to record at this point? Obviously
local_part and domain but is there IP?, Subject? etc. Is there a list.

Thanks a lot for any help

Rick
AASTS