[exim] Content scan -- Mime check -- progress?

Top Page
Delete this message
Reply to this message
Author: Herb Martin
Date:  
To: exim-users
Subject: [exim] Content scan -- Mime check -- progress?

My two Mime-part message is ONLY being processed through
the FIRST part, I believe. I am posting the entire
debug run of the MIME ACL portion below....

Please confirm or correct my present (mis)understanding of
Mime checking and offer a suggestion for correcting what
I believe to be an issue within (my) Exim:

The acl_smtp_mime is called ONCE per message mime PART.
    (Exim 4.50 Specification) 
    Chapter 40. Content scanning 
 <http://www.exim.org/exim-html-4.50/doc/html/spec_40.html> 


<<40.3 Scanning MIME parts
The acl_smtp_mime global option defines an ACL that is
called once for each MIME part of a message, including
multipart types, in the sequence of their position in
the message.>>

So a message with 3 parts will call this acl handler 3
times.

Continuing with...
<<40.3 Scanning MIME parts
This ACL is called (possibly many times) just before
the acl_smtp_data ACL, but only if the message has a
MIME-Version: header. When a call to the MIME ACL does
not yield "accept", ACL processing is aborted and the
appropriate result code is sent to the remote client.
The acl_smtp_data ACL is not called in this circumstance.>>

If an DENY occurs in any part, processing ends and neither
the next mime parts nor the data part will ever be called.

Is the same true for an explicit accept? (I believe so.)

That IS what it says in 40.3 above, "...when A CALL..."
doesn't accept, then ACL processing aborts.

An implicit DENY exists at the end of this ACL if no other
action is specified explicitly -- this is possibly invoked
on EACH part so one must accept (or something?) within
each pass, but that would mean that no other passes would
occur?????

How does one somehow 'defer' until the last part, and then
determine that it is in fact the "last" part, but do this
without "accepting" too early, waiting to the end to invoke
an appropriate Accept (nothng bad seen) or Deny (nothing
good seen <grin>)

Obviously I misunderstand something if the MIME ACL is
working for the rest of you.

Test Using:
$ exim -d+expand+acl+uid -bh IP_ADDR <FILENAME >out.txt 2>&1


--
Herb Martin
HerbM@??? http://LearnQuick.Com
Accelerated MCSE in a Week Seminars

Found Content-Type: header - executing acl_smtp_mime.
Found content-type: MIME header, value is 'multipart/mixed'
Found boundary= MIME parameter in content-type: header, value is
'----=_NextPart_000_0005_14761476.72507250'
====================================================
using ACL "acl_check_mime"
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
processing "deny"
expanding: $mime_content_disposition
   result: 
expanding: ${lc:$mime_content_disposition}
   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_content_disposition}}
{\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_content_disposition}}
{\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N} {1}{0}}
   result: 0
check condition = ${if match {${lc:$mime_content_disposition}}
{\N(\.exe|\.scr|\.vbs|\.pif|\.bat|\.scr|\.lnk|\.com|\.zip)$\N} {1}{0}}
                = 0
deny: condition test failed
processing "accept"
accept: condition test succeeded
Entering multipart recursion, boundary
'----=_NextPart_000_0005_14761476.72507250'
====================================================
Hit EOF ...
using ACL "acl_check_data"