Hi, I have a spamassassin-3.4.4 install with amavisd-2.12 and postfix
on fedora32 and would like to be able to block email from an entire
country on a per-user or per-domain basis. What is the best way to do
this?
I'm currently using the RelayCountry plugin and Amavis::Custom to add
an X-Relay-Countries header to each email, and have a series of rules
of the form:
header RELAYCOUNTRY_JP X-Relay-Countries =~ /JP/
describe RELAYCOUNTRY_JP Relayed through Japan
score RELAYCOUNTRY_JP 0.1
I've also been considering blocking by ASN or IP, but I believe it
would be the same problem just presented in a different way.
How do I tie this into amavisd so that I can allow individual users to
control their own email? Perhaps this is done in a policy_bank?
Perhaps I would analyze the X-Relay-Countries header directly instead
of processing the resulting RELAYCOUNTRY_JP rule, for example?
on fedora32 and would like to be able to block email from an entire
country on a per-user or per-domain basis. What is the best way to do
this?
I'm currently using the RelayCountry plugin and Amavis::Custom to add
an X-Relay-Countries header to each email, and have a series of rules
of the form:
header RELAYCOUNTRY_JP X-Relay-Countries =~ /JP/
describe RELAYCOUNTRY_JP Relayed through Japan
score RELAYCOUNTRY_JP 0.1
I've also been considering blocking by ASN or IP, but I believe it
would be the same problem just presented in a different way.
How do I tie this into amavisd so that I can allow individual users to
control their own email? Perhaps this is done in a policy_bank?
Perhaps I would analyze the X-Relay-Countries header directly instead
of processing the resulting RELAYCOUNTRY_JP rule, for example?