MailScanner 4.30.3, bug with LDAP RuleSet processing?

Julian Field mailscanner at ecs.soton.ac.uk
Mon May 10 16:16:00 IST 2004


Certainly looks like a bug to me. Thanks for spotting that one.

At 16:08 10/05/2004, you wrote:
>Hello List,
>
>This is probably a bug, but could also be an issue with my LDAP schema
>for MailScanner.
>
>As no schema was published for MailScanner, I constructed a schema based
>on the information found in MailScanner/Config.pm.  This shema is
>attached for cross-referencing, along with .ldif's to use the schema,
>and a basic MailScanner.conf used for testing.
>
>Before patching, behaviour with an LDAP ruleset was unpredictable.  A
>bit of debugging showed that only the last entry was being loaded into
>Store1Rule(), compared to all rules as seen with a filename based
>ruleset.
>
>More digging showed the following issue, where the construction of the
>foreach loop only allows it to hit the last seen entry:
>
>-----------------------------------------------------------------------
>--- MailScanner/Config.pm.orig  Tue May 11 00:40:12 2004
>+++ MailScanner/Config.pm       Tue May 11 00:42:23 2004
>@@ -1910,7 +1910,7 @@
>      }
>
>      $RuleScalars{$keyword} = []; # Delete any old inherited rulesets
>-    foreach $rulenum ($#ruleset) {
>+    foreach $rulenum (0..$#ruleset) {
>        #($error, $default) = Store1Rule($ruleset[$rulenum],
>$rulesfilename,
>        ($error, $default) = Store1Rule($ruleset[$rulenum], $keyword,
>                                        $rulenum, $rulesettype,
>-----------------------------------------------------------------------
>
>So, it _looks_ like a bug, and applying this patch does make LDAP rules
>behave properly, but there could be some greater architectural thing
>that I'm missing here w.r.t. LDAP configuration.
>
>The bug would appear to be present in all stable versions between
>4.25.14 and 4.30.3.
>
>Comments from the list?  [ Also cc'ed to mailscanner at ecs.soton.ac.uk ]
>
>--
>Martin Foster                                   Phone:   +61 3 9674 7659
>Systems Engineer               P A C I F I C    Fax:     +61 3 9698 4959
>Pacific Internet (Australia)  I N T E R N E T   Mobile:  +61 4 1608 4325
>http://www.pacific.net.au/                      NASDAQ:  PCNTF
>
>
>
>
>

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

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

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list