Hello ObiWan, I noticed this thread before; but I dont want 40 or more DNSBL's.
I'm using Geoip and this is quick and user-friendly.
For example; we get emails only from our german customers.
Emails from italy, spain ore other countries are at most spam.
Now it's smart to increas the spamscore; is the ip a spammer (wrong helo, SPF, DKIM, DNSBL etc.) the spamscore is reached and blocks the email with 550!
In the other way, the message go thru.
I see, well, you may start from this script
, just add a call to the "DNS lookup"
function from the hMailServer event sink to retrieve the IP country and then,
having it, you may decide how to handle the message; in your case you may
call the function inside the OnClientConnect event and then set the Result.Value
as desired; also, and since you're at it, you may simplify the script found at the
above URL by just running a "TXT" lookup for the (reversed) connecting address
against "zz.countries.nerd.dk" so obtaining the country TLD (suffix) ... or you
may use that code "as is" and optionally add some further fine-grained checks
(e.g. check if the IP owner is "bad" or "good")