I've been trying to stop a bot from sending email with a subject like:
(proper_name) some random porn sentence
by creating filters in cPanel>>Global Email Filters but I am seeing this error in my logs:
[2016-09-01 11:43:45 -0700] warn [Email::has_spam_as_acl] Encountered error
in Email::has_spam_as_acl: Email::has_spam_as_acl(1) failed: This feature
requires the “spamassassin” option and is not enabled on your account.
I seem to remember that Mailscanner disables spamassassin and incorporates it in the actual script of Mailscanner so I was just wondering if there was a way for using mailscanner to create these filters as the normal mailscanner process is missing the spam. Mailscanner catches everything else that is classified as spam but not these emails with subject lines like above.
Hope this makes sense and I appreciate any help or direction to figure this out.
You might have better luck creating your own spamassassin rule(s), which you can add to your own .cf file in /etc/mail/spamassassin/. More info here: http://wiki.apache.org/spamassassin/WritingRules
header SUBJ_PORN1 Subject =~ /write here what to search for/i
score SUBJ_PORN1 11
describe SUBJ_PORN1 Subject PORN
That code will check any email that enters into your server with a subject that contains the phrase that you want to block and will assign an score of 11 that is to high and that way it will be flagged as spam and your users will not receive them.
If you want to block "garbish" porn subjects, check if you have the latest KAM rules.
Hi @andyhans,
to create a body rule you can do this:
1. Create a folder at /etc/spamassasin/blackbody.cf
2. Create your own rule following the next example:
On the body line you can use the "or" pipe as in my example "|" to separte words or phrases that SpamAssassin will block.
Try not to add a lot of "or's".
Sergio wrote: ↑09 Oct 2023, 22:19
Hi @andyhans,
in your rule you use the or command "|" (the pipe sign means "or") and add two or more subjects in the rule, per example: