Using a Ruleset for SpamAssassin Score

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


At 18:41 29/10/2002, you wrote:
>I would have thought that 3 settings such as I want to use would be a
>popular option.

I have a funny feeling that n+1 settings would always be nice for people
who use n.
:)

But let's see what people say...

> >>*********** 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

--
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