Re: [exim] Trying to block all WAN sent zip emails

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dennis Davis
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Trying to block all WAN sent zip emails
On Thu, 16 Jul 2009, Brent Clark wrote:

> From: Brent Clark <brentgclarklist@???>
> To: exim-users@???
> Date: Thu, 16 Jul 2009 11:42:27 +0200
> Subject: [exim] Trying to block all WAN sent zip emails
>
> Im trying to get it that I block all zip files, but users in my LAN can
> send zip files. Ive tried the following, but yet if I send from my gmail
> account, the zip file gets accepted.
>
> deny message = This message contains a prohibited file extension 
> (${extract{-1}{.}{${lc:$mime_filename}}})
> hosts = !+relay_from_hosts :
> #!hosts = 192.168.111.0/24
> log_message = BAD_ATTACHMENT (${extract{-1}{.}{${lc:$mime_filename}}})
> condition = ${if match{${extract{-1}{.}{${lc:$mime_filename}}}}{\N^( \
>                        zip\
>                        )$\N}{1}{0}}

>
> If someone could assist, it would be appreciated.


Section 41.6 of the Exim manual describes how to do this using the
(deprecated) demime condition. Note you'll have to compile support
for this into exim.

Can't say I've used this recently.  It seemed to work OK when I did.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@???               Phone: +44 1225 386101