new version
authornigel <nigel>
Fri, 17 Aug 2001 12:47:12 +0000 (12:47 +0000)
committernigel <nigel>
Fri, 17 Aug 2001 12:47:12 +0000 (12:47 +0000)
filter/system_filter.exim
system_filter.exim

index 356accab9c51fff113245ddfa0d5688787ae910b..0c5450706f9bb23d686c7e300b9c7c3a745d84dc 100644 (file)
@@ -1,6 +1,6 @@
 # Exim filter
-## Version: 0.14
-#      $Id: sysfilter.tmpl,v 1.1 2001/08/15 10:01:01 nigel Exp $
+## Version: 0.15
+#      $Id: sysfilter.tmpl,v 1.3 2001/08/17 12:46:51 nigel Exp $
 
 ## Exim system filter to refuse potentially harmful payloads in
 ## mail messages
@@ -91,7 +91,7 @@ then
   seen finish
 endif
 # same again using unquoted filename [content_type_unquoted_fn_match]
-if $header_content-type: matches "(?:file)?name=(.+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))"
+if $header_content-type: matches "(?:file)?name=(\\\\S+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))"
 then
   fail text "This message has been rejected because it has\n\
             potentially executable content $1\n\
@@ -119,7 +119,7 @@ then
   seen finish
 endif
 # same again using unquoted filename [body_unquoted_fn_match]
-if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))(.+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))[\\\\s;]"
+if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))(\\\\S+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))[\\\\s;]"
 then
   fail text "This message has been rejected because it has\n\
             a potentially executable attachment $1\n\
@@ -172,6 +172,8 @@ endif
 #      library files, cutting down on manual duplication.
 #      Changed \w in filename detection to . - dodges locale problems
 #      Explicit application of GPL after queries on license status
+# 0.15 17 August, 2001
+#      Chnaged the . in filename detect to \S (stops it going mad)
 #
 #### Install Notes
 #
index 4aab7eb4dc2f836026f2a2e7dbb192aaeab8d1b2..c477a1a64de833d90a0a55d21986de3204d61b6c 100644 (file)
@@ -1,6 +1,6 @@
 # Exim filter
-## Version: 0.14
-#      $Id: system_filter.exim,v 1.6 2001/08/15 10:02:33 nigel Exp $
+## Version: 0.15
+#      $Id: system_filter.exim,v 1.7 2001/08/17 12:47:12 nigel Exp $
 
 ## Exim system filter to refuse potentially harmful payloads in
 ## mail messages
@@ -91,7 +91,7 @@ then
   seen finish
 endif
 # same again using unquoted filename [content_type_unquoted_fn_match]
-if $header_content-type: matches "(?:file)?name=(.+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))"
+if $header_content-type: matches "(?:file)?name=(\\\\S+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))"
 then
   fail text "This message has been rejected because it has\n\
             potentially executable content $1\n\
@@ -119,7 +119,7 @@ then
   seen finish
 endif
 # same again using unquoted filename [body_unquoted_fn_match]
-if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))(.+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))[\\\\s;]"
+if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))(\\\\S+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|lnk|pif))[\\\\s;]"
 then
   fail text "This message has been rejected because it has\n\
             a potentially executable attachment $1\n\
@@ -172,6 +172,8 @@ endif
 #      library files, cutting down on manual duplication.
 #      Changed \w in filename detection to . - dodges locale problems
 #      Explicit application of GPL after queries on license status
+# 0.15 17 August, 2001
+#      Chnaged the . in filename detect to \S (stops it going mad)
 #
 #### Install Notes
 #