Feature Request: Multiple Levels of Actions
Jeff A. Earickson
jaearick at COLBY.EDU
Wed May 14 16:45:34 IST 2003
Julian,
Ahh the wonders of perl... This looks great on paper but didn't
seem to work, hmmm. After making the twiddles to MailScanner.conf and
CustomConfig.pm (I put the routine below at the bottom of the file,
before the ending 1;), I stopped and restarted MailScanner. The syslog
said:
May 14 11:10:51 emerald MailScanner[3380]: MailScanner E-Mail Virus
Scanner version 4.20-3 starting...
May 14 11:10:52 emerald MailScanner[3380]: Config: calling custom init
function HighScoringSpamActions
May 14 11:11:01 emerald MailScanner[3412]: MailScanner E-Mail Virus
Scanner version 4.20-3 starting...
May 14 11:11:02 emerald MailScanner[3412]: Config: calling custom init
function HighScoringSpamActions
May 14 11:11:11 emerald MailScanner[3430]: MailScanner E-Mail Virus
Scanner version 4.20-3 starting...
May 14 11:11:12 emerald MailScanner[3430]: Config: calling custom init
function HighScoringSpamActions
(repeat...)
and the system load dropped of towards zero. Not a good sign -- I hope
MailScanner wasn't busy deleting email. Ugh. I changed High Scoring
Spam Actions back to the previous version and restarted again.
--- Jeff
On Tue, 13 May 2003, Julian Field wrote:
> Date: Tue, 13 May 2003 23:20:54 +0100
> From: Julian Field <mailscanner at ECS.SOTON.AC.UK>
> Reply-To: MailScanner mailing list <MAILSCANNER at JISCMAIL.AC.UK>
> 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
>
More information about the MailScanner
mailing list