Re: [Exim] ACL to ALLOW only mentioned attachments type and …

Top Page
Delete this message
Reply to this message
Author: Giuliano Gavazzi
Date:  
To: Dilip M, Bruce Richardson, exim-users
Subject: Re: [Exim] ACL to ALLOW only mentioned attachments type and block *
At 12:57 pm +0530 2004/03/27, Dilip M wrote:
>[...]
>>
>>Hmm. I don't have good things to report on this. If the condition is
>>'demime = *', then $found_extension is not filled. You have to specify
>>an explicit list of extensions before $found_extension will be used and
>>then it will only show the first found extension no matter how many
>>attachments. So I think you have to do something like this:
>>
>>warn set acl_m0 = text_only
>>      demime = txt
>>warn set acl_mo = mixed
>>      demime = *
>>      !demime = txt
>>deny message = Bad attachment
>>      demime = *
>>      condition = ${if eq {$acl_m0}{text_only} {no}{yes}}

>>
>
>
>error in ACL: unrecognized name after "set" in ACL modifier "set acl_mo =
>mixed"
>
>:(


FHS! you should do your homework!

Apart from the obvious typo I think the set statements should be
*after* the conditions, otherwise acl_m0 will *always* be set to
those values.

So, for instance:

warn    demime = txt
         set acl_m0 = text_only


Actually, the whole thing can be rewritten as:

warn    set acl_mo = mixed


warn    demime = txt
         set acl_m0 = text_only



unless you want acl_m0 unset if there are no attachments (and the
modification in this case are trivial).

Giuliano
--
H U M P H
    || |||
  software


Java & C++ Server/Client/Human Interface applications on MacOS - MacOS X
http://www.humph.com/