[exim] Why doesn't MIME file extension match on this ACL?

Top Page
Delete this message
Reply to this message
Author: Herb Martin
Date:  
To: exim-users
Subject: [exim] Why doesn't MIME file extension match on this ACL?
Checking with "exim -d-all -bh IP_ADDRESS <filename",
filename includes a file MIME part "text.zip":

>>> processing "deny"
>>> check condition = ${if match {${lc:$mime_filename}}

{\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N} {1}{0}}
>>>                 = 0
>>> deny: condition test failed


[More file excerpt is down below...]
------=_NextPart_000_0005_14761476.72507250
Content-Type: application/octet-stream;
    name="text.zip"



What is the most likely reason for the failure to match?

How to test? Is my regular expression correct? (I am
pretty good with Regexes but new to Exim syntax (do a
lot of Perl and make my fair share of errors.)


This later test (from the data checks) also fails which gives
me some confidence that the above failure is not due to gross
MIME errors in the file:

>>> processing "deny"
>>> check demime = *
>>> check condition = ${if >{$demime_errorlevel}{2}{1}{0}}
>>>                 = 0
>>> deny: condition test failed


--
Herb Martin


File contents:

[MORE header stuff snipped]
Subject: Good day
Date: Tue, 21 Jun 2005 14:55:31 +0530
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="----=_NextPart_000_0005_14761476.72507250"
X-Priority: 3
X-MSMail-Priority: Normal


This is a multi-part message in MIME format.

------=_NextPart_000_0005_14761476.72507250
Content-Type: text/plain;
    charset="Windows-1252"
Content-Transfer-Encoding: 7bit


The message cannot be represented in 7-bit ASCII encoding and has been sent
as a binary attachment.


------=_NextPart_000_0005_14761476.72507250
Content-Type: application/octet-stream;
    name="text.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename="text.zip"


UEsDBAoAAAAAAC9L1TLOuygqANgAAADYAAAIAAAAdGV4dC5waWZNWgAAAAAAAAAAAABQRQAATAEC

[...SNIPPED BODY...]

JtgAAAAA

------=_NextPart_000_0005_14761476.72507250--