Hallo an die Runde,
Analog zu diesen Post. https://forum.proxmox.com/threads/geoip-with-maxmind.105656/
versuche ich gerade der RelayCountryPlugin einzurichten ...
/etc/pmg/templates/init.pre.in
/etc/mail/spamassassin/custom.cf
spamassassin --lint -D 2>&1|grep -i country
spamassassin --lint -D 2>&1|grep -i geo
aber ...
sonst sehe ich auf die gefilterten Mail keinen Hinweis dass RelayCountry läuft ...
Irgendeine Idee ?
Tips ?
Vielen Dank
Analog zu diesen Post. https://forum.proxmox.com/threads/geoip-with-maxmind.105656/
versuche ich gerade der RelayCountryPlugin einzurichten ...
/etc/pmg/templates/init.pre.in
Code:
loadplugin Mail::SpamAssassin::Plugin::RelayCountry
/etc/mail/spamassassin/custom.cf
Code:
#geodb_module DB_File
#geodb_options country:/var/lib/GeoIP/ipcc.db
ifplugin Mail::SpamAssassin::Plugin::RelayCountry
geodb_module GeoIP2
geodb_search_path /var/lib/GeoIP/
header RELAYCOUNTRY_BAD X-Relay-Countries =~ /^(AR|CN|BR|IN|VN|RU)/
describe RELAYCOUNTRY_BAD First untrusted relay is Argentina, China, Brazil, India, Vietnam or Russia
score RELAYCOUNTRY_BAD 1.5
header RELAYCOUNTRY_SUSP X-Relay-Countries =~ /^(UA|BY|LT|EE|HU|RO|NL)/
describe RELAYCOUNTRY_SUSP First untrusted relay is Ukraine, Belarus, Lithuania, Estonia, Hungary, Romania, Nederland
score RELAYCOUNTRY_SUSP 0.5
header RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(EU|DE)/
describe RELAYCOUNTRY_GOOD First untrusted relay is Deuschland or European Union :-)
score RELAYCOUNTRY_GOOD -0.2
add_header all Relay-Country _RELAYCOUNTRY_
endif # Mail::SpamAssassin::Plugin::RelayCountry
Code:
pmgconfig sync --restart 1
spamassassin -D --lint
spamassassin --lint -D 2>&1|grep -i country
Code:
Apr 30 17:00:18.798 [6921] dbg: diag: [...] optional module installed: IP::Country::DB_File, version 3.03
Apr 30 17:00:18.798 [6921] dbg: diag: [...] optional module installed: IP::Country::Fast, version 604.001
Apr 30 17:00:18.805 [6921] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry from @INC
Apr 30 17:00:21.617 [6921] dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x55d96e5eef48) implements 'extract_metadata', priority 0
Apr 30 17:00:21.617 [6921] dbg: metadata: X-Relay-Countries:
Apr 30 17:00:21.617 [6921] dbg: check: tagrun - tag RELAYCOUNTRY is now ready, value: ARY:[]
Apr 30 17:00:21.617 [6921] dbg: metadata: X-Relay-Countries-External:
Apr 30 17:00:21.618 [6921] dbg: check: tagrun - tag RELAYCOUNTRYEXT is now ready, value: ARY:[]
Apr 30 17:00:21.618 [6921] dbg: metadata: X-Relay-Countries-Auth:
Apr 30 17:00:21.618 [6921] dbg: check: tagrun - tag RELAYCOUNTRYAUTH is now ready, value: ARY:[]
Apr 30 17:00:21.618 [6921] dbg: metadata: X-Relay-Countries-All:
Apr 30 17:00:21.618 [6921] dbg: check: tagrun - tag RELAYCOUNTRYALL is now ready, value: ARY:[]
spamassassin --lint -D 2>&1|grep -i geo
Apr 30 17:02:45.495 [7454] dbg: diag: [...] optional module installed: Geo::IP, version 1.51
Apr 30 17:02:47.371 [7454] dbg: config: no description set for rule GEO_QUERY_STRING
Apr 30 17:02:47.437 [7454] dbg: rules: meta test KAM_IMAGEONLY has undefined dependency 'PDS_OTHER_BAD_TLD'
Apr 30 17:02:48.316 [7454] dbg: geodb: GeoIP2: search found city /var/lib/GeoIP//GeoLite2-City.mmdb
Apr 30 17:02:48.321 [7454] dbg: geodb: GeoIP2: loaded city from /var/lib/GeoIP//GeoLite2-City.mmdb
Apr 30 17:02:48.325 [7454] dbg: geodb: database info: GeoIP2 city: GeoLite2 City database / Thu Apr 27 16:45:52 2023
aber ...
sonst sehe ich auf die gefilterten Mail keinen Hinweis dass RelayCountry läuft ...
Irgendeine Idee ?
Tips ?
Vielen Dank