Custom Function for Virus Scanners Variable

Kyle Harris lists at TRCINTL.COM
Tue Oct 21 00:25:47 IST 2003

Here is some more info regarding my own previous post.  Hopefully someone
will be able to help out.  Anyway, if I set Virus Scanners = &VirusScanners
in the config file and then define the following custom function in the file (this is my entire file for troubleshooting purposes

package MailScanner::CustomConfig;
use strict 'vars';
use strict 'refs';
no  strict 'subs'; # Allow bare words for parameter %'s
use vars qw($VERSION);

sub InitVirusScanners {
  MailScanner::Log::InfoLog("Starting VirusScanners");
sub EndVirusScanners {
  MailScanner::Log::InfoLog("Stopping VirusScanners");
sub VirusScanners {
  MailScanner::Log::InfoLog("Doing VirusScanners");
  my ($message) = @_;
  my @todomain = @{$message->{todomain}};
  print FILE "some junk here\n";
  close (FILE);
  return "clamav";

When I save this and reboot, I receive the "Starting VirusScanners"
and "Doing VirusScanners" log entries twice (I don't when using this method
with other custom functions).  It never writes the out.txt file nor does it
pick up mail from the  MailScanner starts without any
errors.  If I take out the line "my @todomain = @{$message->todomain}};" it
seems to run, but It still runs the code twice at startup.

Julian, any ideas?

More information about the MailScanner mailing list