[SOLVED] Spamassasin Custom.cf not applying

Fear37

Member
Dec 10, 2019
11
0
21
28
Hey guys,

I've made some custom rules in our custom.cf but it's not applying at all.
I've done :
Code:
 systemctl restart pmg-smtp-filter
but still no luck.

Below are output of our custom.cf:
Code:
header __FROM_TLDFROM From =~ /\.(cf|ga|ml|tk|bid|book|click|club|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|uno|webcam|website|work|win|xyz)\>/i

header __FROM_TLDFROMA From:address =~ /\.(cf|ga|ml|tk|bid|book|click|club|cricket|date|democrat|directory|download|faith|help|host|link|ninja|online|party|press|pro|racing|reviews?|rocks|science|site|social|space|stream|top|uno|webcam|website|win|work|xyz)$/i

meta FROM_TLD ( __FROM_TLDFROM + __FROM_TLDFROMA >= 1 )
score FROM_TLD 5
describe FROM_TLD Bad TLD

header LOCAL_FROM_TLD From =~ /@[a-z0-9-.]+.(xyz|guru|pro)/i
describe LOCAL_FROM_TLD From address is a bad host in a listed TLD
score LOCAL_FROM_TLD 5

body __Bitcoin /Bitcoin/i
score __Bitcoin 3
describe __Bitcoin From Body word Bitcoin

header   FROM_SAME_AS_TO   ALL=~/\nFrom: ([^\n]+)\nTo: \1/sm
describe FROM_SAME_AS_TO   From address is the same as To address.
score    FROM_SAME_AS_TO   2.0

body      SPAM_DOC1       /In view of your payment documents/i
describe  SPAM_DOC1       known spam phrase
score     SPAM_DOC1       3.0


body      SPAM_DOC2       /Please see\/review attached./i
describe  SPAM_DOC2       known spam phrase
score     SPAM_DOC2       2.0

Any ideas?
 
I've made some custom rules in our custom.cf
Where exactly is the file in your filesystem?

check the output of `spamassassin -D --lint` - does the file get loaded? (`spamassassin -D --lint 2>&1 |grep custom`)
 
Where exactly is the file in your filesystem?

check the output of `spamassassin -D --lint` - does the file get loaded? (`spamassassin -D --lint 2>&1 |grep custom`)

root@pmg:~# spamassassin -D --lint 2>&1 | grep custom
Sep 2 10:20:42.837 [2843] dbg: config: read file /etc/mail/spamassassin/custom.cf

Seems like it. Could it be the syntax of the custom rules I added?
Custom.cf is under /etc/mail/spamassasin/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!