[exim] db based IP blacklist

Top Page
Delete this message
Reply to this message
Author: Alexander Nagel
Date:  
To: 'exim-users@exim.org'
Subject: [exim] db based IP blacklist
Hi,

I have a simple IP list in my PostGreSQL with inet as type in the table.
Currently i have this snippet in my exim4.conf file in the
acl_smtp_connect part.

drop
condition = ${if eq{$sender_host_address}{${lookup pgsql{PG_Q_BLACKLIST}}}}
message = REJECTED - You are blacklisted
log_message = REJECTED - $sender_host_address is blacklisted.

This works with a single IP address. But I want to add whole ranges of
IP addresses like 192.1.0.0/24
How do I have to change the condition?

regards
Alex