Page 1 of 1

Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-12 13:51
by Rainer
Hello, is it possible to set the spam-score in the function: OnClientConnect?

I wish to modify the spam-score depending on unwanted countries.
For expample, is the country-code "cn" or "kr" then set the spam-score to 10.

Kind regards from Germany :roll:

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-13 03:26
by Bill48105
Helpful? http://www.hmailserver.com/documentatio ... rase=score
long Score

Spam score
Bill

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-13 07:14
by Rainer
Hello Bill, helps not really! :(

Kind regards :)

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-13 14:09
by Bill48105
Hmm Doesn't work, not what you're looking for or you don't know how to use it?
Bill

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-14 19:01
by ObiWan
Rainer wrote:Hello, is it possible to set the spam-score in the function: OnClientConnect?

I wish to modify the spam-score depending on unwanted countries.
For expample, is the country-code "cn" or "kr" then set the spam-score to 10.

Kind regards from Germany :roll:
Have a look at this, it doesn't even need a script :)

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-14 19:12
by Rainer
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.

Kind regards :)

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-14 19:32
by ObiWan
Rainer wrote: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.

Kind regards :)
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")

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-29 16:49
by Snorkasaurus
Rainer wrote:Hello ObiWan, I noticed this thread before; but I dont want 40 or more DNSBL's.
Hey Rainer,

You can easily use countries.nerd.dk without having to create a separate DNSBL for each country you want to block. If you set the DNSBL to zz.countries.nerd.dk (note the "zz") it will return different addresses based on the country of origin. In your "expected results" you provide a list of addresses you want to block separated by pipe symbols (see list of returned addresses here). I have a slightly more detailed explanation here.

Does that accomplish what you are looking for?

Snork.

Re: Setting the Spam-Score in OnClientConnect...

Posted: 2010-08-29 17:32
by Rainer
Hello Snorkasaurus, THX for your answer; its helps!

Kind regards :)