RE: [exim] Why doesn't MIME file extension match on this ACL…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Herb Martin
Υ/ο: exim-users
Αντικείμενο: RE: [exim] Why doesn't MIME file extension match on this ACL?
On Thu, 23 Jun 2005, Herb Martin wrote:

> I had the actual ACL pasted into the message and
> removed it for 'clarity' (<grin>) since it is
> effectively right there in the debug trace....
>
> ### I is in the MIME check:
> deny message = Blacklisted file extension detected ($found_extension)
>    condition = ${if match \
>    {${lc:$mime_filename}} \
>    {\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N} \
>    {1}{0}}

>
>
> ####This one is in the Data check:
> deny message   = Message contains malformed MIME ($demime_reason).
>      demime    = *
>      condition = ${if >{$demime_errorlevel}{2}{1}{0}}


Reading the spec (Tom is the expert in this, not I), I see that the MIME
ACL is called before the DATA ACL, but that $found_extension is set by
the demime= line. That doesn't explain the problem, but it is a bug.

Have you tried a debug run with -d+expand?
Or inserting lines like

logwrite = $mime_filename

into the MIME acl to verify what it's set to?

The regex looks OK, though it is not the fastest way to write a regex
for "ends with". But with short strings it probably won't matter much.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book