parsing rules files & finding offensive lines

Julian Field mailscanner at ecs.soton.ac.uk
Thu Nov 27 08:49:38 GMT 2003


Fixed.
Apply this to /usr/lib/MailScanner/MailScanner/Config.pm

--- Config.pm.old  2003-11-19 15:31:19.000000000 +0000
+++ Config.pm   2003-11-27 08:49:28.000000000 +0000
@@ -1777,8 +1777,8 @@
    flock($rulesfh, $LOCK_UN);
    $rulesfh->close();

-  MailScanner::Log::DieLog("Aborting due to syntax errors in %s.",
-                           $rulesfilename) if $errors;
+  MailScanner::Log::WarnLog("Error: Syntax errors in %s.", $rulesfilename)
+    if $errors;
  }



At 20:23 26/11/2003, you wrote:
>Hi,
>
>we have an installation with a sysadmin who is able (kind of) to create
>whitelist & blacklist rules.
>
>We did a rough web page for him to add address patterns to block or
>whitelist and then create the spam.whitelist.rules and
>spam.blacklist.rules from there.
>
>Now, if a rule has a problem in the pattern, MailScanner happily (and
>silently) dies...
>
>Typical problems are patterns like that must include a "+" or "="...
>these have to be prepended by a "\".
>
>The question is, is there a way to verify a rule is correct (at least to
>the point of _not_ making MailScanner silently die)?
>
>I'd like to verify rulesets (or better yet individual rules) off-line so
>I can warn the user (or at least forbid him to apply the new ruleset).
>
>For what I saw, ruleset processing is deep inside MailScanner::Config
>
>--
>Mariano Absatz
>El Baby
>----------------------------------------------------------
>The primary purpose of the DATA statement is to give names to
>constants; instead of referring to pi as 3.141592653589793 at
>every appearance, the variable pi can be given that value with
>a DATA statementand used instead of the longer form of the constant.
>This alsosimplifies modifying the program, should the value of pi
>change.
>                          -- FORTRAN manual for Xerox computers

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415 B654



More information about the MailScanner mailing list