|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Trying to block all WAN sent zip emailsHi all
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. Kind Regards Brent Clark -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/ |
|
|
Re: Trying to block all WAN sent zip emailsHi,
Brent Clark wrote: > Hi all > > 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}} > deny hosts = !+relay_from_hosts : condition = ${if match {${lc:$mime_filename}} {\N(\.zip)$\N} {1}{0}} message = Blacklisted file extension detected in "$mime_filename". -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/ |
|
|
Re: Trying to block all WAN sent zip emails> From: Brent Clark
> condition = ${if match{${extract{-1}{.}{${lc:$mime_filename}}}}{\N^( \ I suspect the blank before the backslash at the end. -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/ |
|
|
Re: Trying to block all WAN sent zip emailsOn 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 -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/ |
|
|
Re: Trying to block all WAN sent zip emailsRenaud Allard wrote:
> Wouldn't be something like this easier? > > deny > hosts = !+relay_from_hosts : > condition = ${if match {${lc:$mime_filename}} {\N(\.zip)$\N} {1}{0}} > message = Blacklisted file extension detected in "$mime_filename". Thanks This did the trick. Regards Brent Clark -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/ |
| Free embeddable forum powered by Nabble | Forum Help |