[Mimedefang] Bad extensions and vCards

Michael McCarthy m.mccarthy at psy.uq.edu.au
Thu May 30 18:51:42 EDT 2002


At 06:11 PM 30/05/02 -0400, you wrote:
>On Thu, 30 May 2002, Kelson Vibber wrote:
>
> > I've added a $ at the end of the expression in filter_bad_filename
> > so that it will only match at the end of the string.
>
>See 
>http://lists.roaringpenguin.com/pipermail/mimedefang/2002-April/000899.html
>for the rationale behind my decision not to include the $.
>David.

OK, granted, but nevertheless there are some anomalies. For example, 
yesterday our mimedefang-filter was rejecting a legitimate .ppt file 
because its filename was "B.CommunicationPublicity.ppt" (because of the 
".Com")!

Why not something like

sub filter_bad_filename {
     my($entity) = @_;
     return re_match($entity, 
'\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|hlp|hta|inf|ini|ins|isp|js|jse|lib|lnk|mde|msc|msi|msp|mst|ocx|pcd|pif|reg|scr|sct|shb|shs|sys|url|vb|vbe|vbs?|vxd|wsc|wsf|wsh|\{[a-f0-9-]+\})[$\s]');
}

Cheers
Mike




-
================
Michael McCarthy
IT Manager
School of Psychology
The University of Queensland
+617 3365 6687




More information about the MIMEDefang mailing list