"Paul Murphy" <[EMAIL PROTECTED]> writes:

>         if ($zip->read($path) == AZ_OK) {
>            ...
>         }

There is a room for improvement here. 8-)

First, in case of an error in processing an archive, Archive::Zip
routines are printing some error messages and call traces by default.
We don't want them.

Second, we should do something in case of error.

So, a better version:
-----------------------------------------------------------------------------
        sub dummy {};
        Archive::Zip::setErrorHandler(\&dummy);
        if ($zip->read($path) == AZ_OK) {
            ...
        } else {
# do something with broken .zip files (eg. discard)
#          action_quarantine_entire_message("broken zip");
           md_graphdefang_log('bad_file', 'broken zip', $RelayAddr);
           action_discard();
        }
-----------------------------------------------------------------------------

  MJ
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to