4.39.3-1 bug or is it me - but 4.38.9-1 OK!
Julian Field
MailScanner at ecs.soton.ac.uk
Fri Feb 25 16:15:24 GMT 2005
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
In Message.pm around line 2351 you will find "Sub ConstructWarning".
Please change the start of the code there to
sub ConstructWarning {
my $this = shift;
my($attachmententity, $scannersaid, $id, $reportname) = @_;
# If there is no report file then we create no warning
return "" unless $reportname;
my $date = scalar localtime;
my $textfh = new FileHandle;
my $dir = $global::MS->{work}{dir}; # Get the working directory
my $localpostmaster = MailScanner::Config::Value('localpostmaster',
$this);
my $postmastername = MailScanner::Config::LanguageValue($this,
'mailscanner');
The important bit is the return statement.
Let me know if this helps.
Quentin Campbell wrote:
>>-----Original Message-----
>>From: MailScanner mailing list
>>[mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Julian Field
>>Sent: 25 February 2005 15:13
>>To: MAILSCANNER at JISCMAIL.AC.UK
>>Subject: Re: 4.39.3-1 bug or is it me - but 4.38.9-1 OK!
>>
>>Ah! I hadn't seen that error in context before.
>>
>>All the places it can have come from are in Message.pm.
>>Can you put a little bit of debugging (e.g. print STDERR "Got to point
>>1\n";) just before each occurrence of "Cannot open message" in
>>the file.
>>
>>
>
>I had done some initial digging and I said in one of my first messages
>it was probably from Message.pm! :-(
>
>Doing what you suggest I get:
>
>[root at cheviot7 tmp]# check_mailscanner
>Starting MailScanner...
>In Debugging mode, not forking...
>SA bayes lock is /root/.spamassassin/bayes.lock
>Bayes lock is at /root/.spamassassin/bayes.lock
>DEBUG: Got to point 3
>Can't call method "print" on an undefined value at
>/usr/lib/perl5/site_perl/5.8.0/MIME/Entity.pm line 1803.
>[root at cheviot7 tmp]#
>
>And in Message.pm, "point 3" is at line 2401 in the "entity" modified
>Message.pm file:
>
>...
> $month++;
> $year += 1900;
> my $datenumber = sprintf("%04d%02d%02d", $year, $month, $day);
>
># # Do we want to hide the directory and message id from the report
>path?
># if (MailScanner::Config::Value('hideworkdir', $this)) {
># my $pattern = "(" . quotemeta($global::MS->{work}->{dir}) .
>"|\.)/$id/";
># $report =~ s/$pattern//gm;
># }
>
> print STDERR "DEBUG: Got to point 3\n";
> open($textfh, $reportname)
> or MailScanner::Log::WarnLog("Cannot open message file %s, %s",
> $reportname, $!);
> my $line;
> while(defined ($line = <$textfh>)) {
> chomp $line;
> #$line =~ s/"/\\"/g; # Escape any " characters
> #$line =~ s/@/\\@/g; # Escape any @ characters
> $line =~ s/([\(\)\[\]\.\?\*\+\^"'@])/\\$1/g; # Escape any regex
>characters
> # Untainting joy...
>...
>
>
>
>>Are you warning sender, bouncing spam or notifying spam?
>>
>>
>
>In the case of spam we simply tag and deliver mostly. This is controlled
>by rulesets:
>
>Spam Actions = %rules-dir%/Spam_Actions.rules
>...
>High Scoring Spam Actions = %rules-dir%/High_Scoring_Spam_Actions.rules
>
>The default for both ruleset files is "deliver attachment". The other
>190+ entries in each file are mainly "delete" with a few "deliver" and a
>few "deliver striphtml".
>
>Quentin
>
>------------------------ MailScanner list ------------------------
>To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>'leave mailscanner' in the body of the email.
>Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
>the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
>
>Support MailScanner development - buy the book off the website!
>
>
>
--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list