[Mimedefang] re_match in filter_begin

Kevin A. McGrail kmcgrail at pccc.com
Fri Feb 29 18:33:48 EST 2008


Follow-up on my earlier code.  I think if I want to trick MD into thinking I 
have a different scanner temporarily, I need to do this.  It's untested but 
I definitely didn't have it right before.

      if (re_match($entity, '\.docx?') && 1 == 2) {
        $Features{'Virus:NAI_temp'} = $Features{'Virus:NAI'};
        $Features{'Virus:NAI'} = undef;
        $Features{'Virus:CLAMAV'} = '/usr/local/clamav/bin/clamscan';
        undef @VirusScannerMessageRoutines;
        undef @VirusScannerEntityRoutines;
        $VirusScannerRoutinesInitialized = 0;
        initialize_virus_scanner_routines();

...

        $Features{'Virus:NAI'} = $Features{'Virus:NAI_temp'};
        $Features{'Virus:CLAMAV'} = undef;
        undef @VirusScannerMessageRoutines;
        undef @VirusScannerEntityRoutines;
        $VirusScannerRoutinesInitialized = 0;
        initialize_virus_scanner_routines();
      }
    }

Regards,
KAM 




More information about the MIMEDefang mailing list