[Mimedefang] survey: dropping password protected file

Todd Aiken taiken at ubishops.ca
Wed Mar 3 11:07:00 EST 2004


> I use modified code gleaned from the mailing list (thanks to Michal Jankowski)
> and updated with a better extension list (a la the Bad_Filename check, which
> catches ClassIDs as well) and more debugging:  (watch for line-wrapping!)
> 
> #------------------------------------------------------------------------------
> # Check for banned files in ZIP files - may add considerable processing time
> # Requires Archive::Zip to be up to date - base Debian version is ancient and
> does
> # not have the tempFileName utility
> #
>     if (lc($ext) =~ /\.zip$/) {
>         my $path = $entity->bodyhandle->path;
>         my $zip = Archive::Zip->new();
>         if ($zip->read($path) == AZ_OK) {

Having trouble with the last line above.  My system seems to catch these 
password protected files, but I'm getting the following in my syslog when 
it does so:

mimedefang-multiplexor: Slave 0 stderr: Argument AZ_OK isn't numeric in 
numeric eq (==) at /etc/mail/mimedefang-filter line 291

Tried changing the line to eq "AZ_OK", but then nothing gets detected.


CU L8R...

Todd A. Aiken 
Systems Analyst - Administrator
Cole Computer Centre
BISHOP'S UNIVERSITY
Lennoxville, Quebec, CANADA

"GUIs on servers... That's like putting an air conditioner on a 
motorcycle..."

-----BEGIN GEEK CODE BLOCK-----
Version 3.12 (http://www.geekcode.com)
GCS$/MU d+(-) s++:+ a C++$ UL++++$ P+ L++ E->+ W+>++ N++ o? K-
w O- M V? PS PE- Y PGP- t+ 5 X R- tv+ b DI(+) D++ G e+ h !r>r+++ y-
------END GEEK CODE BLOCK------





More information about the MIMEDefang mailing list