Page 1 of 1

Block specific keyword and subject and content

Posted: 21 Feb 2019 03:57
by jagcbe
Hi All,

I am new to EFA, We receive more number of spam message from last 2 weeks.
I would like to block and Mail have Bad words like porn, bitcoin etc in the mail content and subject
Where should i add above keywords to block the mails in future,
Let me know in detail...
Kindly see the image
Untitled.jpg
Untitled.jpg (217.12 KiB) Viewed 28700 times
Please Help Me
Thanks and regards,
Jagadeesh

Re: Block specific keyword and subject and content

Posted: 21 Feb 2019 10:12
by shawniverson
Read this:

https://wiki.apache.org/spamassassin/WritingRules

Create your rules in /etc/mail/spamassassin/local.cf

Re: Block specific keyword and subject and content

Posted: 26 Feb 2019 16:52
by mattch
notes ive taken:

you could put these rules in /etc/mail/spamassasin/local.cf , but i find it easier to make a new file, like "jagcbes.cf" then add your custom rules. anything with .cf in the folder is picked up.

for a super simple rule to give score if the string is present, score can be "+" or "-":

body RULE /onecup/
score RULE 100
describe RULE a description

for more advanced rules you better check out the WritingRules page from sa.

Re: Block specific keyword and subject and content

Posted: 25 Nov 2019 02:58
by pdwalker
There is also the MCP functionality of efa.

(Quick poll, does anyone use the MCP?)

Re: Block specific keyword and subject and content

Posted: 25 Nov 2019 19:09
by shawniverson
I don't, because it calls SA a second time.