Feature Request: Multiple Levels of Actions
Derek Winkler
dwinkler at ALGORITHMICS.COM
Wed May 14 18:45:13 IST 2003
So...
I can implement this by:
-creating InitSpamActions, which would load my config from it's own file
into an array
-creating SpamActionsSubject, which would decide whether to modify subject
or not
-creating SpamActions, which would return the actions based on score from
array created in InitSpamActions
Using the following config options
Required SpamAssassin Score=5 (or whatever) Would my functions not even be
called unless this was reached?
Spam Subject Text = &SpamActionsSubject
Spam Actions = &SpamActions
and leaving out "High Scoring SpamAssassin Score", "High Scoring Spam
Subject Text" and "High Scoring Spam Actions" since they wouldn't be needed
anymore?
-----Original Message-----
From: Julian Field [mailto:mailscanner at ecs.soton.ac.uk]
Sent: Tuesday, May 13, 2003 6:21 PM
To: MAILSCANNER at jiscmail.ac.uk
Subject: Re: Feature Request: Multiple Levels of Actions
Implementing a file like you suggest is not necessarily very easy. As soon
as I do that, someone will want the ranges to be allowed to overlap, adding
the list of actions as appropriate (and what happens when they clash?).
Then you will need to be able to set this per user or per domain, so it has
to be setup from another ruleset.
So it's quite a bit of work, and I don't think it's necessary.
Read on...
This can already be very easily done with a small Custom Function.
In MailScanner.conf set
Required SpamAssassin Score = 4
Spam Subject Text = {Spam?}
Spam Actions = deliver
High Scoring SpamAssassin Score = 9
High Scoring Spam Subject Text = {HIGH SPAM}
High Scoring Spam Actions = &HighScoringSpamActions
Then in CustomConfig.pm
sub HighScoringSpamActions {
my($message) = @_;
my $score = $message->{sascore}; # Field names at top of Message.pm
return 'forward jaearick at colby.edu' if $score<=12;
return 'delete';
}
There, that wasn't too painful was it?
At 20:35 13/05/2003, you wrote:
>Julian,
>
>I would sure use this setup too. I would use it as:
>
> #---deliver (hopefully) non-spam, less than 4
> <4 deliver
>
> #---deliver maybe-spam, range 4-9
> 4 modify "{Spam?}", deliver
>
> #---let my procmail rules trap probable spam, range 9-12
> 9 modify "{HIGH SPAM}", forward jaearick at colby.edu
>
> #---certain spam, delete it, range > 12
> >12 delete
>
>Tis a great suggestion...
>
>--- Jeff Earickson
>
>On Tue, 13 May 2003, Derek Winkler wrote:
>
> > Date: Tue, 13 May 2003 12:45:05 -0400
> > From: Derek Winkler <dwinkler at ALGORITHMICS.COM>
> > Reply-To: MailScanner mailing list <MAILSCANNER at JISCMAIL.AC.UK>
> > To: MAILSCANNER at JISCMAIL.AC.UK
> > Subject: Feature Request: Multiple Levels of Actions
> >
> >
> > Feature request:
> >
> > I'd like to have another level of spam actions but instead of creating
> > Mid-scoring spam config options why not create something like the rule
> > files...
> >
> > Spam Actions = /opt/MailScanner/etc/rules/spam.actions.rules
> >
> > spam.actions.rules would contain something like:
> >
> > 9 modify "{Spam?}", deliver
> > 15 modify "{Spam?}", striphtml, deliver
> > max delete
> >
> > with the first line applying to mails which score 9 or below, the second
to
> > >9 <=15, and the last for anything >15. You could have as many or few as
> > needed.
> >
> > This would eliminate the need for the following config options:
> >
> > Spam Modify Subject
> > Spam Subject Text
> > High Scoring Spam Modify Subject
> > High Scoring Spam Subject Text
> > Spam Actions
> > High Scoring Spam Actions
> >
> > I'd find this handy anyways,
> >
> > Derek Winkler
> > Security Administrator
> > Algorithmics Inc., Toronto
> > Tel: (416) 217-4107
> > Fax: (416) 971-6263
> > www.algorithmics.com
> >
--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20030514/ec3b8c49/attachment.html
More information about the MailScanner
mailing list