[Mimedefang] Fw: You`ve got 1 VoiceMessage!

Paul Murphy pmurphy at ionixpharma.com
Mon Jun 14 04:44:19 EDT 2004


KAM,

> 
> if (filter_bad_filename($entity) == 2) {
>         md_graphdefang_log('really_bad_filename');
>         action_bounce("This file type not accepted here");
>         return action_discard();
>     } elsif (filter_bad_filename($entity)) {
> ...
> }

Rather than call filter_bad_filename twice for every MIME part, it would be
better to store the status and then check it twice:

$badfile_status=filter_bad_filename($entity);
if ($badfile_status == 2) {
        md_graphdefang_log('really_bad_filename');
        action_bounce("This file type not accepted here");
        return action_discard();
    } elsif ($badfile_status)) {
...
}

For some of the messages I see, the overhead of checking the name twice builds
up to be fairly significant.

Best Wishes,

Paul.
__________________________________________________
Paul Murphy
Head of Informatics
Ionix Pharmaceuticals Ltd
418 Science Park, Cambridge, CB4 0PA

Tel. 01223 433741
Fax. 01223 433788


_______________________________________________________________________
DISCLAIMER:
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which they
are addressed.  If you have received this email in error please contact
the sender or the Ionix IT Helpdesk on +44 (0) 1223 433741
_______________________________________________________________________ 



More information about the MIMEDefang mailing list