Page 1 of 1

Hwo to setup RelayCountry to work with spamassassin and mailscanner front end

Posted: 17 Feb 2024, 22:51
by nermin_dadan
Hwo to setup RelayCountry:
I've found this script:
loadplugin Mail::SpamAssassin::Plugin::RelayCountry
ifplugin Mail::SpamAssassin::Plugin::RelayCountry
add_header all Relay-Countries _RELAYCOUNTRY_
add_header all Relay-Country _RELAYCOUNTRY_
report X-Relay-Countries: _RELAYCOUNTRY_
report X-Relay-Country: _RELAYCOUNTRY_
header RC_GOD X-Relay-Countries =~ /(BA|HR|DE)/
describe RC_GOD Relayed through a prohibited country at some point
score RC_GOD 0.1
endif

For some reason, headers in Mailscanner Front End do show: X-Relay-Countries: _RELAYCOUNTRY_ X-Relay-Country: _RELAYCOUNTRY_ but without any info of country.

I've installed MaxMind database as per this link: https://support.cpanel.net/hc/en-us/art ... -mod-geoip

I would like to know if it is possible to block some countries to send emails to my server if email was going thru them. These countries are just for test.

Thank you!

Nermin

Re: Hwo to setup RelayCountry to work with spamassassin and mailscanner front end

Posted: 18 Feb 2024, 20:54
by nermin_dadan
I've managed to make them appear in header, but there is no country to show.
This is part of the header:
0.0 HTML_MESSAGE BODY: HTML included in message
0.5 KAM_REALLYHUGEIMGSRC RAW: Spam with image tags with ridiculously
huge http urls
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.0 T_SCC_BODY_TEXT_LINE No description available.
-0.4 DKIMWL_WL_HIGH DKIMwl.org - High trust sender
X-Relay-Countries: _RELAYCOUNTRY_
X-Relay-Countries: _RELAYCOUNTRY_
X-Relay-Countries: _RELAYCOUNTRY_
X-Relay-Country: _RELAYCOUNTRY_
X-Spam-Flag: NO