Penguin
Diff: EximMailFilter
EditPageHistoryDiffInfoLikePages

Differences between version 16 and predecessor to the previous major change of EximMailFilter.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 16 Last edited on Monday, June 27, 2005 12:32:09 pm by JamieCurtis Revert
Older page: version 14 Last edited on Wednesday, June 8, 2005 11:37:22 am by CraigBox Revert
@@ -189,4 +189,68 @@
  deny message = Serious MIME defect detected ($demime_reason) 
  demime = * 
  condition = ${if >{$demime_errorlevel}{2}{1}{0}} 
 </pre> 
+  
+Recent exiscans (including the one included with Exim 4.50) have deprecated demime, instead adding a acl_smtp_mime ACL. This is more powerful than the precvious demime, but as always, is more complex to get the above features.  
+  
+See http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20050523/msg00117.html for a thread on this. Otherwise add something like the following:  
+  
+<pre>  
+ # Decode MIME parts to disk. This will support virus scanners later.  
+ deny  
+ decode = default  
+ condition = ${if > {$mime_anomaly_level}{2} \  
+ {true}{false}}  
+ message = This message contains a MIME error ($mime_anomaly_text)  
+ log_message = DENY: MIME Error ($mime_anomaly_text)  
+  
+ # Too many MIME parts  
+ #  
+ deny  
+ condition = ${if >{$mime_part_count}{1024}{yes}{no}}  
+ message = MIME error: Too many parts (max 1024)  
+ log_message = DENY: MIME Error (Too many MIME parts: $mime_part_count)  
+  
+ # Excessive line length  
+ #  
+ deny  
+ regex = ^.{131071}  
+ message = MIME error: Line length in message or single header exceeds 131071.  
+ log_message = DENY: MIME Error (Maximum line length exceeded)  
+  
+ # Partial message  
+ #  
+ deny  
+ condition = ${if eq {$mime_content_type}{message/partial}{yes}{no}}  
+ message = MIME error: MIME type message/partial not allowed here  
+ log_message = DENY: MIME Error (MIME type message/partial found)  
+  
+ # Filename length too long (> 255 characters)  
+ #  
+ deny  
+ condition = ${if >{strlen:$mime_filename}{255}{yes}{no}}  
+ message = MIME error: Proposed filename exceeds 255 characters  
+ log_message = DENY: MIME Error (Proposed filename too long)  
+  
+ # MIME boundary length too long (> 1024)  
+ #  
+ deny  
+ condition = ${if >{strlen:$mime_boundary}{1024}{yes}{no}}  
+ message = MIME error: MIME boundary length exceed 1024 characters  
+ log_message = DENY: MIME Error (Boundary length too long)  
+  
+ # File extension filtering.  
+ deny  
+ condition = ${if match \  
+ {${lc:$mime_filename}} \  
+ {\N(\.bat|\.btm|\.cmd|\.com|\.cpl|\.dll|\.exe|\.lnk|\.msi|\.pif|\.prf|\.reg|\.scr|\.vbs|\.url)$\N} \  
+ {1}{0}}  
+ message = Blacklisted file extension detected in "$mime_filename". If you legitimately need to send these files please zip them first.  
+ log_message = DENY: Blacklisted extension ("$mime_filename")  
+</pre>  
+  
+Unfortunatly because of a bug in exim 4.50 you may see "cannot test regex condition in MIME ACL". This stops you doing the Line Length check. This is described here:  
+  
+http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20050307/msg00131.html  
+  
+You can tweak the values for Proposed filename, MIME boundary length and Line Length to work for your users Some mailers conform more strictly to the mime spec than others.