MailScanner Internals

Steve Freegard steve.freegard at LBSLTD.CO.UK
Fri Apr 16 14:28:11 IST 2004


Clive Eisen wrote:
> Julian Field wrote:
>
>> At 11:50 16/04/2004, you wrote:
>>
>>> Julian - sorry to ask you directly but I suspect only you will know
>>> the answer :-)
>>>
>>> In what combination of circumstances is $message->{virusinfected}
>>> set?
>>>
>>> I have seen $message->{nameinfected} set and
>>> $message->{othereinfected} set, but never $message->{virusinfected}
>>>
>>> I'm trying to write a custom function and am a bit puzzled.
>>
>>
>> A quick grep of the code reveals that it is set in SweepViruses.pm
>> when a virus report is merged into the list of all the reports for a
>> batch. -- Julian Field
>> www.MailScanner.info
>> MailScanner thanks transtec Computers for their support
>>
>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> Does that mean that it does not relate to an individual message?

No - it is per message.

>
> I have sent viruses and tried to check their value,
> including, following
> the recomendations in the other reply to this thread, in
> Always Looked
> Up Last and it's still not set

Strange - I've only problems with the message object variables once before
(yesterday in fact) on a new customers site, but the virusinfected value was
set correctly, however $message->{allreports} only contained the report from
one scanner (there should have been three reports) - I still haven't worked
out what the problem is yet though.

Which version of MailScanner are you running - and which virus scanners do
you use?

Try running this test code in CustomConfig.pm:

sub InitVirusInfectedTest {
 ;
}

sub EndVirusInfectedTest {
 ;
}

sub VirusInfectedTest {
 my($message) = @_;
 my($id) = $message->{id};
 my($virusinfected) = $message->{virusinfected};
 MailScanner::Log::InfoLog("VirusInfectedTest saw: id=$id,
virus=$virusinfected");
}

Then set:

Always Looked Up Last = &VirusInfectedTest

And watch /var/log/maillog for the message from this function as each
message is processed and see what you get.

>
> My point is - I cannot produce the circumstances when it is set or at
> least, not during the processing of a given message at least.
>
> Ho Hum and thanks for your swift help.

Kind regards,
Steve.

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



More information about the MailScanner mailing list