Re: [exim] Mime + filename matching

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Craig Jackson
CC: exim-users
Subject: Re: [exim] Mime + filename matching
On 2008-02-08 at 16:39 -0600, Craig Jackson wrote:
> Okay, I'm really showing my mime ignorance here, but it only happens
> when the attachment shows up within the body of the email as if it were
> inline rather than as an attachment (using Thunderbird). I hope that
> makes sense. The size of the emails are well over the limit in every
> case. I've tried duplicating this by sending the exact same attachment
> but the acl catches it. It's got to be a mime issue. Here's the header
> from an email containing the same image sent from a yahoo! (god help
> them) account to me that was caught by the same acl:


Okay; I diagnosed on most obvious issues, such as size, rather than
looking deeply into the regexp. Having more data definitely helps.

Which ACL is this on? You don't mention that.

What do you see in debugging output when you bounce such a message
through Exim? "exim -d+acl+expand" should be useful.

     condition = ${if or { \
         {
 match{${lc:$mime_filename}}{\N^(?>.*)(?<=zip|emz|iso|wma|jpg|jpeg|pps|ppt|gif|png|wmv|mpg|mp3|mpeg|avi|wav|bmp|mov|asf|asx|mpe)\N}} \
         {
 match{${lc:$mime_content_type}}{\N^(zip|emz|iso|wma|jpg|jpeg|pps|ppt|gif|png|wmv|mpg|mp3|mpeg|avi|wav|bmp|mov|asf|asx|mpe)\N}} \
         }{1}{0}}


The second regexp is matching a filename extension pattern against a
content-type. Something like image/bmp is a content-type. What you
have will work, accidentally, where the mime sub-type name matches the
extension.

In the first case, checking against mime_filename, you use atomic
grouping to match on the entire filename (?>.*) and then check that what
comes just before has the relevant letters; you're not actually checking
that it's an extension, so a file named "bmp" would match, as would
"foo.xbmp". So it's buggy, even though it should catch the case you
have.



Also, why is it that none of my replies to you get delivered to you?
You seem to hang at RCPT stage until the sender (my system) times out.
Every single time I reply to you. Every delivery attempt. Whatever
response you see is coming in via the list. The bounces are ...
irritating.

2008-02-08 22:32:32
cjackson@??? <CJackson@???>
R=outbound_signed T=remote_dksign
defer (60): Operation timed out:
SMTP timeout while connected to puma.abbott-simses.com [64.66.85.242]
after RCPT TO:<CJackson@???>

-Phil