Re: [exim] ACL mime filter

Pàgina inicial
Delete this message
Reply to this message
Autor: Customer Support
Data:  
A: Exim Mailing List
Assumpte: Re: [exim] ACL mime filter


I've been going round in circles for 2 days now with this one.
I'm after scanning gif/jpg mime files between 4 and 50Kb and then rejecting
if the mime scanner returns a bad result.
As you can see from what I've got so far, ACL's aren't my strong point.
I'm sure this could all have been combined into one ACL?
So far it's detecting the mime file fine and decoding it but I'm not seeing
anything run through exim_mime.php
(I'm not even sure what exim_mime.php should be returning in order to reject
a message!)

  warn message = Image detected
       condition     = ${if match {${lc:$mime_filename}}
{\N(\.gif|\.jpg|\.jpeg)$\N} {1}{0}}
       decode        = /tmp/exim/$message_id
       set acl_m9    = scan


  deny message =  Spam detected
       condition     = ${if eq {$acl_m9}{scan}{true}{false}}
       condition     = ${run{/etc/exim_mime.php $sender_host_address
$message_id} {true}{false}}



This would be cleaner but can't get it working either.

  deny message = Image detected
       condition     = ${if match {${lc:$mime_filename}}
{\N(\.gif|\.jpg|\.jpeg)$\N} {1}{0}}
       decode        = /tmp/exim/$message_id
       condition     = ${if > {${eval:$mime_content_size}}{4}{yes}{no}}
       condition     = ${if < {${eval:$mime_content_size}}{50}{yes}{no}}
       condition     = ${run{/etc/exim_mime.php $sender_host_address
$message_id} {true}{false}}


Can anyone dig me out of a hole?

Thanks

John