On Tue, Sep 16, 2014 at 10:15:03PM +0200, li...@rhsoft.net wrote:

> I removed all comments AFAIK
> that are 3 single lines without any break not added by the mail-client

I've copied the rule below into my test file, and it works:

    $ postmap -q 'Content-Type: name="test.exe"; charset=us-ascii' 
pcre:/tmp/foo.pcre
    REJECT 554 Attachment Blocked (Rule 0)

You've not posted your test input or postmap -q invocation with output.

> # Reject Attachment Extensions
> 
> /^Content-(?:Disposition|Type):
>   (?:.*?;)? \s*
>   (?:file)?name \s* = \s*"?
>    (
>    .*?(\.|=2E)
>      
> (386|acm|ade|adp|awx|ax|bas|bat|bin|cdf|chm|cmd|cnv|com|cpl|crt|csh|dll|dlo|drv|exe|hlp|hta|inf|ins|isp|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ocx|ops|pcd|pif|pl|prf|reg|scf|scr|script|sct|sh|shb|shm|shs|so|sys|tlb|vb|vbe|vbs|vbx|vxd|wiz|wll|wpc|wsc|wsf|wsh)
>    )
>    (?:\?=)?
>    "?
>    \s*(;|$)
>  /x   REJECT 554 Attachment Blocked (Rule 0)
> 
> /^\s*Content-(Disposition|Type).*name\s*=\s*"?(.*(\.|=2E)(386|acm|ade|adp|awx|ax|bas|bat|bin|cdf|chm|cmd|cnv|com|cpl|crt|csh|dll|dlo|drv|exe|hlp|hta|inf|ins|isp|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ocx|ops|pcd|pif|pl|prf|reg|scf|scr|script|sct|sh|shb|shm|shs|so|sys|tlb|vb|vbe|vbs|vbx|vxd|wiz|wll|wpc|wsc|wsf|wsh))(\?=)?"?\s*$/x
>  REJECT 554 Attachment Blocked (Rule 1)
> 
> /^\s*Content-(?:Disposition|Type):(?:.*?;)?\s*(?:file)?name\s*=\s*"?(.*?(\.|=2E)(386|acm|ade|adp|awx|ax|bas|bat|bin|cdf|chm|cmd|cnv|com|cpl|crt|csh|dll|dlo|drv|exe|hlp|hta|inf|ins|isp|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ocx|ops|pcd|pif|pl|prf|reg|scf|scr|script|sct|sh|shb|shm|shs|so|sys|tlb|vb|vbe|vbs|vbx|vxd|wiz|wll|wpc|wsc|wsf|wsh))(?:\?=)?"?\s*(;|$)/x
>   REJECT 554 Attachment Blocked (Rule 2)
> 
> /name=[^>]*\.(386|acm|ade|adp|awx|ax|bas|bat|bin|cdf|chm|cmd|cnv|com|cpl|crt|csh|dll|dlo|drv|exe|hlp|hta|inf|ins|isp|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ocx|ops|pcd|pif|pl|prf|reg|scf|scr|script|sct|sh|shb|shm|shs|so|sys|tlb|vb|vbe|vbs|vbx|vxd|wiz|wll|wpc|wsc|wsf|wsh)\"/
>  REJECT 554 Attachment Blocked (Rule 3)


-- 
        Viktor.

Reply via email to