Adding custom rules - spamassassin

Peter H. Lemieux mailscanner at replies.cyways.com
Tue Oct 10 16:20:11 UTC 2017


Usually the local rules go in /etc/mail/spamassasin.  The SA-supplied 
rules are in /usr/share/spamassassin.  Items in the first directory 
usually expand the ruleset, though you can override existing rules there 
as well.  Usually that's done only to adjust the scores given to those 
pre-existing rules.

I'm not sure what you are asking for though.  Are you looking to create 
multiple conditions that must be met?  You can use the "meta" directive 
for that.  In the example you give, there's nothing to distinguish 
between the two rules, so I can't tell what you're trying to accomplish.

Are you handling mail for multiple domains?  If you're only accepting 
mail for "example.com," then you can omit the To: part of the rule and 
just key on the From;.

Peter


On 10/10/2017 10:51 AM, Koby Peleg Hen wrote:
> Hello Petter
> Thank you for your answer,
> I already been there, but thank you anyway.
> 
> I have 2 question please :
> 
> 1.where to put it so it can be merge to the other rule in the system and 
> NOT override them
> 
> 2.There is any way to preform specific rule for specific condition like :
> 
>   From *@bad-domain.com To Example.com CheckRuleNo1
>   From *@bad-domain1.com To Example.com CheckRuleNo2
> 
>   etc..
> 
> 
> Thank you for your co operation
> Koby Peleg Hen
> 
> On 10/10/17 16:25, Peter H. Lemieux wrote:
>> Start here: https://wiki.apache.org/spamassassin/WritingRules
>>
>> Peter
>>
>>
>> On 10/10/2017 07:13 AM, Koby Peleg Hen wrote:
>>> Hello All
>>> I Would like to add a custom rules to spamassassin to prevent 
>>> specific  body / header content.
>>> Please show me a quick example.
>>>
>>> Thank you for your co operation
>>> Koby Peleg Hen
>>>
>>>
>>>
>>>
>>
>>
> 


More information about the MailScanner mailing list