[Mimedefang] Attachment blocking regexp

Chris Masters rotis23 at yahoo.com
Sun Mar 21 05:07:53 EST 2004


Hi All,

We had a legitimate attachment blocked last week
called "something.com and something.xls".

I tested with the following code:

$guess = "www.mimedefang.com and test.xls";

$bad_exts = '(dll|exe|com|\{)';

$regexp = '\.' . $bad_exts .
'\.*([^-A-Za-z0-9_.,]|$)';

if($guess =~ /$regexp/i)
{
        print "it's bad\n";
}
else
{
        print "it's good\n";
}

Can someone confirm this is intended behaviour?

I assume it prevents the possibility of a renamed bad
filename much like a double extension?

Thanks, Chris

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



More information about the MIMEDefang mailing list