Re: [exim] content type matching acl

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: Craig Jackson
Υ/ο: exim-users
Αντικείμενο: Re: [exim] content type matching acl
On 2008-08-14 at 15:51 -0500, Craig Jackson wrote:
> In the mime acl, there is a condition for catching emails with certain
> content types:
>
>
> match{${lc:$mime_content_type}}{\N^(?>.*)(?<=m4a|powerpoint|ppt|pps|quic
> ktime|msvideo|javascript|midi|zip|wma|jpg|jpeg|gif|png|wmv|mpg|mp3|mpeg|
> mpeg-2|avi|wav|bmp|mov|asf|asx|mpe)\N}
>
> However, an email with a gif got through that had a content type as
> follows:
>
> Content-Type: image/gif;
>     name="image001.gif"

>
> Is the final quote the problem? Or is the filename located in the
> content type the problem? Could this be fixed by adding "? to the regex
> like this?


No; $mime_content_type does not include any options such as "name" so
that's not being considered. (In theory; I haven't checked source).

If you take a copy of the received message, strip off headers added by
your system, run "exim -d+acl+expand -bs -bh orig.in.al.ip" then do SMTP
to send the message, you'll (a) not deliver it, so don't worry about
duplicates and (b) be able to see the ACL logic and the string
expansions. The string expansion should show you what was in
$mime_content_type and the ACL debugging logic as a whole will confirm
that this condition was even being tested.

-Phil