Re: [exim] Exim file filters

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Ian
Datum:  
To: exim-users
Betreff: Re: [exim] Exim file filters
Tim Jackson het geskryf:
> Ian wrote:
>
>
>> I need to block attachments based on the endings of file names - eg no
>> *.exe files are allowed to pass.
>>
>
> Aside from the spec (manual), there are lots of sample configurations and
> other information at http://www.exim.org/eximwiki/ . In this case:
>
> http://www.exim.org/eximwiki/ExiscanFilenameBlocking
>
> Tim
>
>

Hi

Thanks for the lead - it is what I required.

I opted for the first option on the page, as it was mentioned that the
demime option is deprecated.

Unfortunately I could not get it to filter yet.

I added the line acl_smtp_mime = acl_check_mime to the

acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

grouping.

The other 2 ACL's were working before the addition of the 3rd and are
still functional.

I added the following after the acl_check_data section

acl_check_mime:

 deny     message = Bad attachment filename ($mime_filename): $acl_m0
          set acl_m0 = ${lookup {$mime_filename} nwildlsearch 
{/usr/exim/mime_regexes} }
          condition = ${if def:acl_m0 }


accept


The mime_regexes file contains:

^.*\.exe
^.*\.scr
^.*\s{10}
^.{50}


Exim accepts all messages and passes all attachments - it does not seem
to scan the mail.

It has to be a minor thing I'm doing wrong.

Your assistance would be appreciated.

Kind regards

Ian