Using GeoIP with Exiscan
have recently written a patch for exiscan to allow exim blocking emails based on the country they have been received from. Please note this does not block based simply on the top level domain of the email addresss domain part. It does a lookup in the GeoIP database (which obviously, you need to install first).
Details on GeoIP can be found here. You will require this to be installed on your system if you wish to use my GeoIP patch.
My patch is currently a complete replacement for exiscan 28, and applies cleanly to exim 4.43. I know my code also works with exim 4.42 and exiscan 27, but I'm too lazy to maintain multiple patch sets, if it doesnt' apply cleanly to your source tree, only minor modifications should be required.
<code> Example usage:
warn message = X-Country-Code: $geoip_code
geoip = *
warn message = X-Country: $geoip_country
geoip = *
<code>
Please feel free to buy something from my amazon wishlist ;)
Download my GeoIP patch here