[Exim] using mysql with filters help

Top Page
Delete this message
Reply to this message
Author: Terry M
Date:  
To: exim-users
Subject: [Exim] using mysql with filters help
Greetings.

I am trying to use mysql to hold my filter files
( lists of domains, IP's ect )

this example of how I do it now.

if ("${lookup{$sender_host_address} lsearch
{/usr/exim/db/black.servers}{$value}}" is "black")
    then
    seen mail expand file /usr/exim/blh-bounce
    to $return_path return message
   subject "Returned mail: blacklisted"
endif




this is an example of attempt of using mysql

if (" ${lookup mysql {select ipaddr from blackserver
where ipaddr like '$sender_host_address'}} ")
then
logwrite "I FOUND IT IN MYSQL
senderhostaddr=$sender_host_address "
endif

I have table called blackserver with field called
ipaddr

{ select * from blackserver
will show them all .. }

any help or example of how to do such things with
mysql and filters would be great



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com