Using a Ruleset for SpamAssassin Score

Julian Field mailscanner at ecs.soton.ac.uk
Tue Oct 29 18:29:35 GMT 2002


At 18:16 29/10/2002, you wrote:
>OK, but what would happen to "High Scoring Spam Actions"?

Good point, if your high score was less than 20 then this rule would be
ignored in favour of the high score spam action.

>Or should I just do the first two in the custom function (last 2 in
>descending order)?

You can do that. Yes.


>Peter
>
>*********** REPLY SEPARATOR  ***********
>
>On 29/10/2002 at 4:56 PM Julian Field wrote:
>
> >At 16:38 29/10/2002, you wrote:
> >>Can you give me an example of how to do a ruleset for "Required
> >>SpamAssassin Score" please?
> >>
> >>What I want to achieve is eg
> >>
> >>Score = 5,   deliver forward spam at localhost
> >>Score = 7,   store forward stored at localhost
> >>Score = 20,  forward deleted at localhost delete
> >>
> >>But from what I see, I would somehow need to combine rulesets, and I just
> >>can't get my head around how to make it work.
> >
> >You can set the required spam score for different addresses.
> >You can set the spam actions for different addresses.
> >But you cannot easily do both in a simple ruleset.
> >
> >What you could do though is create a custom function &SpamAction for "Spam
> >Actions".
> >         Spam Actions = &MySpamAction
> >Put this in CustomConfig.pm (that file should already exist. If it doesn't
> >then upgrade to a version that does have it).
> >
> >sub InitMySpamAction {
> >         ; # No initialisation needed for this plugin
> >}
> >
> >sub MySpamAction {
> >         my($message) = @_;
> >
> >         my $score = $message->{sascore}; # You can look up attributes in
> >Message.pm
> >         # Done in decreasing order so the highest scoring result is used
> >         return 'forward deleted at localhost delete' if $score>=20.0;
> >         return 'forward stored at localhost store' if $score>=7.0;
> >         return 'forward spam at localhost deliver' if $score>=5.0;
> >         return 'deliver';
> >}
> >
> >--
> >Julian Field                Teaching Systems Manager
> >jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
> >Tel. 023 8059 2817          University of Southampton
> >                             Southampton SO17 1BJ

--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list