Geolocating-Filter (solved)

Dieses Forum ist für alle Copfilter v2 support Anfragen in Deutsch. (IPCop version 2)

Geolocating-Filter (solved)

Postby cjmatsel » 23 Nov 2015 17:54

Hi,

kennt jemand eine Möglichkeit oder ein Spam-AddOn um einen Geo-filter einzusetzen? Oder kennt jemand eine Option wie man das proxsmtp.log einer Geolocating-Analyse unterziehen könnte?

Code: Select all
cat /var/log/copfilter/default/log/proxsmtpd.log | grep "accepted connection from"
hilft schonmal die angenommenen Quell-IPs herauszubekommen... ;-)

cu,
cjmatsel
Last edited by cjmatsel on 22 Mar 2016 11:59, edited 1 time in total.
cjmatsel
 
Posts: 46
Joined: 05 Jan 2010 18:16

Re: Geolocating-Filter?

Postby ShelbyGT500 » 29 Nov 2015 13:14

Hi,

Sorry for english, ich spreche deutsch nicht sehr gut! :D

If i'm understand right, you want to filter spam according the country.

Add this lines in /var/log/copfilter/default/opt/mail-spamassassin/etc/mail/spamassassin/local.cf
Code: Select all
##### RELAY COUNTRY
add_header all Relay-Country _RELAYCOUNTRY_
include updates_spamassassin/relay_country_rules.cf

Create a new file "relay_country_rules.cf" in /var/log/copfilter/default/opt/mail-spamassassin/3.4.0/share/spamassassin
Add this (for example, country to modify if necessary)
Code: Select all
########" RELAY COUNTRY RULES
#
#
#
header RELAYCOUNTRY_BAD    X-Spam-Relay-Country =~ /CN/
describe RELAYCOUNTRY_BAD    Relayed through China at some point
score RELAYCOUNTRY_BAD    3.0

header RELAYCOUNTRY_GOOD    X-Spam-Relay-Country =~ /^(FR|DE)/
describe RELAYCOUNTRY_GOOD    First trusted relay is FRANCE or GERMANY
score RELAYCOUNTRY_GOOD   -0.5

Restart Spamassassin.

Regards

ShelbyGT500
ShelbyGT500
 
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: Geolocating-Filter?

Postby cjmatsel » 22 Dec 2015 12:18

Hi,

habe diese (sehr gute) Idee umgesetzt; leider wurde trotz Neustart mind. noch eine IP aus China und Vietnam akzeptiert...

Muss man eine Geo-DB updaten?

Ganz lieben Dank dafür!

cu,
cjmatsel

edit:
http://www.spamhaus.org/statistics/countries/

Code: Select all
########" RELAY COUNTRY RULES
#
#
#
header RELAYCOUNTRY_BAD    X-Spam-Relay-Country =~ /^(IN|US|CN|RU|JP|UA)/
describe RELAYCOUNTRY_BAD    Relayed through India, USA, China, Russia, Japan, Ukraine at some point
score RELAYCOUNTRY_BAD    3.0

header RELAYCOUNTRY_GOOD    X-Spam-Relay-Country =~ /^(DK|DE|FI|SE)/
describe RELAYCOUNTRY_GOOD    First trusted relay is GERMANY, Daenemark, Finnland, Sweden
score RELAYCOUNTRY_GOOD   -0.5
cjmatsel
 
Posts: 46
Joined: 05 Jan 2010 18:16


Return to German Copfilter v2 Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron