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