Can't add relay-country header to all messages...

Questions and answers about how to do stuff
Post Reply
iandarke
Posts: 12
Joined: 23 Apr 2015 23:18

Can't add relay-country header to all messages...

Post by iandarke » 22 May 2020 17:40

File: /etc/MailScanner/spam.assassin.prefs.conf

Content added to end:

Code: Select all

ifplugin Mail::SpamAssassin::Plugin::RelayCountry

header          RELAYCOUNTRY_BAD X-Relay-Countries =~ /^(CN|RU|DE)/
describe        RELAYCOUNTRY_BAD Testing country relay plugin
score           RELAYCOUNTRY_BAD 0.1
add_header all Relay-Country _RELAYCOUNTRY_

endif # Mail::SpamAssassin::Plugin::RelayCountry

I restarted spamassassin and mailscanner, but I was expecting to see something like this in my mail headers:

X-Spam-Relay-Country: US CN RU

It doesn't seem like headers are being added, but I did spot this in a recent spam so I know the rule is working (although for some reason the description isn't??)

Code: Select all

0.79	RDNS_NONE	Delivered to internal network by a host with no rDNS
0.10	RELAYCOUNTRY_BAD	 
0.00	SPF_HELO_NONE	SPF: HELO does not publish an SPF Record
I think my spamassassin configuration is correct and I'm *guessing* that something else in the spam processing chain is effecting the headers.


Sources:
https://cwiki.apache.org/confluence/dis ... ntryPlugin
viewtopic.php?t=1556

User avatar
pdwalker
Posts: 1260
Joined: 18 Mar 2015 09:16

Re: Can't add relay-country header to all messages...

Post by pdwalker » 23 May 2020 05:56

iandarke wrote:
22 May 2020 17:40
It doesn't seem like headers are being added, but I did spot this in a recent spam so I know the rule is working (although for some reason the description isn't??)
Tools and Links, Update SpamAssassin Rule Descriptions.

That should fix that problem.

iandarke
Posts: 12
Joined: 23 Apr 2015 23:18

Re: Can't add relay-country header to all messages...

Post by iandarke » 23 May 2020 19:40

Thanks.

Does anyone have any suggestions for where to look to get the extra header to be included? I think I'm creating it properly, but I'm guessing some later technology in the pipeline is removing it...?

User avatar
shawniverson
Posts: 3089
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Can't add relay-country header to all messages...

Post by shawniverson » 23 May 2020 20:13

I think it is the way mailscanner calls spamassassin. I'll take a look.
Version eFa 4.0.2 now available!

Post Reply