MailScanner Internals
Clive Eisen
clive at SERENDIPITA.COM
Fri Apr 16 17:48:32 IST 2004
Rick Cooper wrote:
>>-----Original Message-----
>>From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
>>Behalf Of Clive Eisen
>>Sent: Friday, April 16, 2004 10:20 AM
>>To: MAILSCANNER at JISCMAIL.AC.UK
>>Subject: Re: MailScanner Internals
>>
>>
>>Rick Cooper wrote:
>>
>>
>>
><snip
>
>
>>>>>Note that MessageBatch.pm sets $message->{virusinfected} = 0; in sub
>>>>>DisinfectAndDeliver
>>>>>so it seems it would not still be set if used as an
>>>>>
>>>>>
>>alwayslookuplast last
>>
>>
>>>>>since it appears that call is made in bin/MailScanner after
>>>>>
>>>>>
>>all the other
>>
>>
>>>>>processing. What are you trying to do in the custom function?
>>>>>
>>>>>
>>It might be
>>
>>
>>>>>you need to patch a call in from somewhere else to achieve what
>>>>>
>>>>>
>
>You don't see what your looking for because you need to catch it before it's
>unset
>
>
><snip>
>
>
>>Cheers - I'll give it a whirl - I still don't really understand why I
>>never get anything set in $message{virusinfected} though.
>>
>>
>>
>
>Bear in mind that you need to save the patch, repatch and fix the
>language.conf every time you update MS
>
>
OK I've done some more investigation and it looks like the line that is
supposed to set virusinfected never runs - so it's not set in the first
place!
in SweepViruses.pm in MergeReports
the second InfoLog is never run
The first one reports
Apr 16 17:46:12 message1 MailScanner[12661]: Report merging for "" and
"HASH(0x9db87d8)"
That is- the message id is missing so the 'next' is executed.....
while (($id, $reports) = each %$Reports) {
MailScanner::Log::InfoLog("Report merging for \"$id\" and
\"$reports\"\n");
#print STDERR "Report merging for \"$id\" and \"$reports\"\n";
next unless $id && $reports;
my $message = $batch->{messages}{"$id"};
#print STDERR "Message is $message\n";
MailScanner::Log::InfoLog("VirusInfected being set
**************************");
$message->{virusinfected} = 1;
More information about the MailScanner
mailing list