Block specific keyword and subject and content

Questions and answers about how to do stuff
Post Reply
jagcbe
Posts: 3
Joined: 22 Nov 2018 04:55

Block specific keyword and subject and content

Post 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 28675 times
Please Help Me
Thanks and regards,
Jagadeesh
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Block specific keyword and subject and content

Post by shawniverson »

Read this:

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

Create your rules in /etc/mail/spamassassin/local.cf
mattch
Posts: 44
Joined: 28 Mar 2018 22:26

Re: Block specific keyword and subject and content

Post 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.
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Block specific keyword and subject and content

Post by pdwalker »

There is also the MCP functionality of efa.

(Quick poll, does anyone use the MCP?)
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Block specific keyword and subject and content

Post by shawniverson »

I don't, because it calls SA a second time.
Post Reply