|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: PCRE Case matching
From: Noel Jones (njones
megan.vbhcs.org)
Date: Mon Jan 03 2005 - 13:27:46 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jan 03, 2005 at 06:28:39AM +0200, Jesse Long wrote:
> Hi,
>
> I have the following PCRE restriction on incoming mail
> ((mime_|nested_)?header_checks). This does block *.exe, but allows
> *.EXE. Surely the /i would mean "dont worry about case"?
>
> Is there something I'm doing wrong?
>
> /^((Content-(Disposition: attachment;|Type:).*|\ +)| *)(file)?name\ *=\
> *"?.*\.(exe|vbs|vb|js|com|bat|dll|zip|scr|msc|reg|pif)"?/i REJECT
> Unwanted or dangerous attachment type
>
As Ralf says, /i to postfix means case must match. (postfix ignores
case by default).
> PS. From header_checks(5) I gather I need both mime_ and nested_ header
> checks to be 100% sure. Is this correct?
>
No, mime_header_checks will always check any MIME attachment related
headers. Nested_header_checks only checks regular message headers
included in an RFC822 attached message.
--
Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]