Problem with Perl 5.8 -> 5.10 upgrade

Julian Field MailScanner at ecs.soton.ac.uk
Mon Mar 30 14:27:01 IST 2009


You've got an old version, this is a bug in Perl 5.10.
However, there is a workaround in the latest beta.
But if you don't want to install a new version, you can patch your 
existing one.
Edit SMDiskStore.pm and around line 359, there is an "if" statement with 
a loop in it.
Replace that whole chunk of code with this:
# Handle trackback -- This is the tricky one
   if ($configwords[1] =~ /tr[ua]/i) {
     my $i;
     for ($i=(@{$body}-1); $i>=0; $i--) {
       last if $body->[$i] =~ /^\s*$/i;
       pop @{$body};
     }
     return;
   }
and then restart MailScanner, and you should find it works now.

On 30/3/09 13:53, mailscanner at bengrimm.net wrote:
> Hi guys, hope you can shed some light on this:
>
> Platform: FreeBSD 7.1-STABLE
> Version: MailScanner-4.67.6_4 (latest version in ports)
> With: clamav-0.95, bdc-7.0.1_2, p5-Mail-SpamAssassin-3.2.5_2
> Perl: 5.10 (no problems with exact same config under perl 5.8)
>
> ----------------------------------------------------------
> Error in logs when starting on a new email:
>
> MailScanner: waiting for children to die: Process did not exit 
> cleanly, returned 255 with signal 0
>
> ----------------------------------------------------------
> # mailscanner --lint /usr/local/etc/MailScanner/MailScanner.conf
> Trying to setlogsock(unix)
> Checking version numbers...
> Version number in MailScanner.conf (4.67.6) is correct.
>
> Your envelope_sender_header in spam.assassin.prefs.conf is correct.
>
> Checking for SpamAssassin errors (if you use it)...
> SpamAssassin temp dir = /tmp/SpamAssassin-Temp
> SpamAssassin reported no errors.
> MailScanner.conf says "Virus Scanners = bitdefender clamd"
> Found these virus scanners installed: bitdefender, clamd
> =========================================================================== 
>
> =========================================================================== 
>
> Virus Scanner test reports:
> Bitdefender said "Found virus EICAR-Test-File (not a virus) in file 
> eicar.com"
> Clamd said "eicar.com was infected: Eicar-Test-Signature FOUND"
>
> If any of your virus scanners (bitdefender,clamd)
> are not listed there, you should check that they are installed correctly
> and that MailScanner is finding them correctly via its 
> virus.scanners.conf.
>
> No problems there.
> ----------------------------------------------------------
> # mailscanner --debug-sa /usr/local/etc/MailScanner/MailScanner.conf
> (nothing)
>
> No problems there.
> ----------------------------------------------------------
> # mailscanner --debug /usr/local/etc/MailScanner/MailScanner.conf
> In Debugging mode, not forking...
> Trying to setlogsock(unix)
> SpamAssassin temp dir = /tmp/SpamAssassin-Temp
> Building a message batch to scan...
> Have a batch of 2 messages.
> Can't use string ("1036") as an ARRAY ref while "strict refs" in use 
> at /usr/local/lib/MailScanner/MailScanner/SMDiskStore.pm line 359, 
> <GEN50> line 1037.
>
> Note: the "1036" "<GEN50>" and "1037" depend on the emails being 
> processed, so these numbers vary all the time. When there's no email 
> to scan, the --debug session will just sit there patiently. As soon as 
> an email arrives:
>
> Have a batch of 1 message.
> Can't use string ("36") as an ARRAY ref while "strict refs" in use at 
> /usr/local/lib/MailScanner/MailScanner/SMDiskStore.pm line 359, 
> <GEN47> line 36.
>
> Any idea what may be causing this? MailScanner, SA, ClamAV, BDC, and 
> all necessary perl modules have been rebuilt against perl 5.10. As 
> noted, this setup worked flawlessly with perl 5.8
>
> TIA.
>
>

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

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


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list