Proxmox Mail GW 7.x SA custom rules does not apply

ArchanfelHUN

Member
Apr 27, 2020
15
0
6
44
Hi!

I try to make some custom rules what add extra score to certain emails, like this for example (added everything to the /etc/mail/spamassassin/custom.cf and restart pmg-smtp-filter after the changes):
rawbody __ADATHALASZ_2_TEST1 /click/i
rawbody __ADATHALASZ_2_TEST2 /here/i
meta ADATHALASZ_2 (__ADATHALASZ_2_TEST1 && __ADATHALASZ_2_TEST2)
score ADATHALASZ_2 1.0
describe ADATHALASZ_2 Possible phising email 2

Or this:
rawbody __ADATHALASZ_1_TEST1 /confirm/i
rawbody __ADATHALASZ_1_TEST2 /your/i
rawbody __ADATHALASZ_1_TEST3 /account/i
meta ADATHALASZ_1 (__ADATHALASZ_1_TEST1 && __ADATHALASZ_1_TEST2 && __ADATHALASZ_1_TEST3)
score ADATHALASZ_1 2.0
describe ADATHALASZ_1 Possible phising email 1

Or this:
rawbody ADATHALASZ_TAKAREK /TAKAREK Service team/i
score ADATHALASZ_TAKAREK 2.0
describe ADATHALASZ_TAKAREK TAKAREK bank phising email.

spamassassin --lint gives me no error, so far so good.
If i send an email to myself with these words i should see the rule name in the email header and the extra score, but none of it appeared.
I try it with 'body' instead of 'rawbody' but still not working.

Also this one works:
header LOCAL_HORNYAK_RULE From=~ /hornyak/i
score LOCAL_HORNYAK_RULE -16.0
describe LOCAL_HORNYAK_RULE Surname Hornyak got negative score to compensate the word 'horny' extra score.

So it seems the header detection works good but the body not.

Anyone can help me whats wrong?
Thanks!

Peter
 
Last edited:
mhm.. works here without problems
i tested a simple body matching rule, and i copied your first example (but used body instead of raw body) and a mail with 'click here' matched...

can you post the exact mail and the logs to it?
also what does

Code:
spamassassin -D --lint
say? (maybe put the output in a file and attach it)
 
mhm.. works here without problems
i tested a simple body matching rule, and i copied your first example (but used body instead of raw body) and a mail with 'click here' matched...

can you post the exact mail and the logs to it?
also what does

Code:
spamassassin -D --lint
say? (maybe put the output in a file and attach it)
Yes, here is the output.
 

Attachments

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!