Re: [Exim] Filters Help

Top Pagina
Delete this message
Reply to this message
Auteur: Kevin Sindhu
Datum:  
Aan: Luciano Cerda
CC: exim-users
Onderwerp: Re: [Exim] Filters Help
On Wed, Jul 11, 2001 at 12:03:18PM -0300, Luciano Cerda penned:
> Hi all,
>
> I need information about filters in exim.
>
> I need the exim filter filtering the atachments on files
> with .dwg extension.
>
> How do I create this in a sample exim filter file?
>
> Thanks in advanced.


Hmm..I am lazy. If you are running the system-filter.exim, apply the
attached patch.

-Kevin

-- 
Main's Law:
    For every action there is an equal and opposite government program.

--- system_filter.exim    Wed Jul 11 08:01:29 2001
+++ 2    Wed Jul 11 08:03:02 2001
@@ -54,7 +54,7 @@


 # Look for single part MIME messages with suspicious name extensions
 # Check Content-Type header using quoted filename [content_type_quoted_fn_match]
-if $header_content-type: matches "(?:file)?name=(\"[^\"]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif)\")"
+if $header_content-type: matches "(?:file)?name=(\"[^\"]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif|dwg)\")"
 then
   fail text "This message has been rejected because it has\n\
          \tpotentially executable content $1\n\
@@ -65,7 +65,7 @@
   seen finish
 endif
 # same again using unquoted filename [content_type_unquoted_fn_match]
-if $header_content-type: matches "(?:file)?name=([\\\\w.-]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif))"
+if $header_content-type: matches "(?:file)?name=([\\\\w.-]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif|dwg))"
 then
   fail text "This message has been rejected because it has\n\
          \tpotentially executable content $1\n\