RE: [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: RE: [exim] Why doesn't MIME file extension match on this ACL?
> 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?


Somewhere I must have misread the -d docs and didn't see
that there was + and - options. I have been using -d-all
which I now understands turns OFF such debugging.

(I have been reporting that in my posts but your are the
first to offer a correction. Thanks.)

> Or inserting lines like
> logwrite = $mime_filename
> into the MIME acl to verify what it's set to?


No I have not. THANK YOU!!!

That is the kind of info I need -- baring a direct solution.

And with this type of info I will be able to solve other
similar problems as well. Such help is really appreciated.

Although I have read large parts of the entire spec, and
much of the relevant areas several times in the past few
days since I started learning Exim.

[Going to do these things NOW!]

There must be something wrong with my port (Cygwin) -- the
expansion is "" for $mime_filename in every part but this
will give me something to report to the maintainer over there.
(output is at end of this message)

Should that logwrite show up in the debug output? Is there
something like debugwrite?

> 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.


I would be happy to see a better way...

This was mostly just copied from examples, and I was also
trying to keep it simple and not too different from samples
I have seen.

Thanks.

Using: exim -d+expand+acl -bh IP_ADDRESS <qIIFGYK-251687.cnm
Snippet with $mime_filename expansion:

processing "deny"
expanding: $mime_filename
   result:
expanding: ${lc:$mime_filename}
   result:
expanding: \N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N
   result: (\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$
condition: match {${lc:$mime_filename}}
{\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N}
   result: false
expanding: 1
   result: 1
skipping: result is not used
expanding: 0
   result: 0
expanding: ${if match {${lc:$mime_filename}}
{\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N} {1}{0}}
   result: 0
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