relay country score?

393 views
Skip to first unread message

rtaka...@gmail.com

unread,
Apr 10, 2017, 3:12:19 AM4/10/17
to rspamd
I want to give an arbitrary score depending on the country of the receiving host(Receive header).

ex) "US" = -1.0, "Other US" = +2.0, "KW" = +5.0

It's like "Relay Country" for spamassassin.
Optional scoring to country and result display possible.

I thought that could use GoeIPlookup
But I do not know how to realize it.

Is there a way to implement it?

Andrew Lewis

unread,
Apr 10, 2017, 3:35:20 AM4/10/17
to rsp...@googlegroups.com
Hi,

ASN map might be the closest thing:
https://rspamd.com/doc/modules/multimap.html

It uses country associated with the ASN, not actual geolocation.

IP checked is the one that handed off the message, which is generally
not extracted from Received headers unless integration (Rmilter etc)
doesn't provide it.

Best,
-AL.

rtaka...@gmail.com

unread,
Apr 10, 2017, 5:26:14 AM4/10/17
to rspamd
thanks for advice.

I try multimap configration.

ex) ./local.d/multimap.conf
---
receive_server_whitelis_country {
    type = "country";
    map = "/etc/rspamd/multimaps/asn_country.map";
    symbol = "ASN_COUNTRY";
    score = -1.0;
}
---
ex) /etc/rspamd/multimaps/asn_country.map
---
US
---

When "type = country" is chosen, which "filter" should be described?

Toxa

unread,
Aug 31, 2017, 10:17:31 AM8/31/17
to rspamd
That works for me:

XX_COUNTRY_BANNED {
  type = "country";
  map = "file:///etc/rspamd/maps/countries_banned.map";
  description = "IP in a banned country";
  score = 8.0;
}

Message has been deleted

Patrick Pichon

unread,
Aug 31, 2017, 1:58:04 PM8/31/17
to rspamd
What is the format of the countries in the countries_banned.map
cn for China ?
id for India ?

Toxa

unread,
Sep 1, 2017, 7:45:23 AM9/1/17
to rspamd


On Thursday, 31 August 2017 19:58:04 UTC+2, Patrick Pichon wrote:
What is the format of the countries in the countries_banned.map
cn for China ?
id for India ?


Reply all
Reply to author
Forward
0 new messages