Date: 2005-02-25T00:34:12
   Editor: VincenzoGianferrari
   Wiki: Apache James Wiki
   Page: ClamAVScan
   URL: http://wiki.apache.org/james/ClamAVScan

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -28,7 +28,7 @@
     1. Gets all config.xml parameters, handling the defaults;
     1. resolves the <host> parameter, creating the round-robin IP list;
     1. connects to CLAMD at the first IP in the round-robin list, on the 
specified <port>;
-    1. if unsuccessful, retries every <pingIntervalMilli> milliseconds up to 
maxPings> times;
+    1. if unsuccessful, retries every <pingIntervalMilli> milliseconds up to 
<maxPings> times;
     1. sends a "PING" request;
     1. waits for a "PONG" answer;
     1. repeats steps 3-6 for every other IP resolved.
@@ -62,6 +62,7 @@
 
 ...
 
+<!-- Do an antivirus scan -->
 <mailet match="All" class="ClamAVScan" onMailetException="ignore"/>
 
 <!-- If infected go to virus processor -->
@@ -69,6 +70,11 @@
    <processor> virus </processor>
 </mailet>
 
+<!-- Check attachment extensions for possible viruses -->
+<mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd *.pif *.scr 
*.vbs *.avi *.mp3 *.mpeg *.shs" class="ToProcessor" onMatchException="noMatch">
+   <processor> bad-extensions </processor>
+</mailet>
+
 ...
 
 <!-- Messages containing viruses -->
@@ -98,3 +104,5 @@
 ...
 
 }}}
+
+The reason for the ''onMailetException="ignore"'' entry in the ClamAVScan 
mailet "call" is to avoid losing the message if an Exception is unlikely 
thrown, but it is just my choice, as I have a "second line" defense blocking 
"bad extensions" with an "AttachmentFileNameIs=" call.

Reply via email to