Deleting detected spam for some addresses only

Glenn Steen glenn.steen at
Tue Apr 24 10:26:34 IST 2007

On 24/04/07, Gareth <list-mailscanner at> wrote:
> What I would like to do is have high scoring spam automatically deleted
> for some addresses but still delivered for the remaining users.
> Currently mailscanner configuration contains :-
> High Scoring Spam Actions = deliver attachment header "X-Spam-Flag: YES"
> If I change this to :-
> High Scoring Spam Actions = %rules-dir%/high.scoring.spam.rules
> and then create the high.scoring.spam.rules file containing :-
> To:             an.address at       delete
> To:             another.address at  delete
> FromOrTo:       default                     deliver attachment header
> "X-Spam-Flag: YES"
> Would that work?
> Is there any problems associates with having a quotes string on the
> right hand side for example?
Yes, it should.
You can always do the edits and test them prior to going live... Just
do the edits, then run
MailScanner --lint
and then some permutations of

MailScanner --value=highscoringspamactions --from=glenn.steen at
--to=some at add.res --ip=
Looked up internal option name "highscorespamactions"
With sender = glenn.steen at
  recipient = some at add.res
Client IP =
Virus =
Result is "store delete"
.... you get the picture:-).
When you've got it right, just reload/restart MailScanner...

-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se

More information about the MailScanner mailing list