User Tools

Site Tools


Increase the spam score for certain recipients

This script is for the case where you want certain recipients to have a weighted score. For instance if you have users who have left and who mostly receive spam, but you don't want to reject their mail totally.

Add the following to the spamrules_userchecks.txt file. This script file only gets processed on incoming messages (the spamrules_localmail.txt script ends the processing of locally sent messages)

DefineRule "DodgyRecipients" 1 "Rule to add score to certain recipients"
BulkScan Score [DodgyRecipients]
To "recipient1@h" 50
Cc "" 50
To "" 50
Cc "" 50  

You can add as many addresses as you want, and alter the '' addresses as you wish. (Note that in this example, these are pure substring matches, not regular expressions).

When an address matches, then the spam filter will add '50' onto the spam score (the default threshold for messages to be marked as spam is 100) - you can alter the 50 at the end of the line as appropriate for your requirements.

reference/spamrules_checkrecipient.txt · Last modified: 2018/11/14 10:45 (external edit)