Author: vincenzo
Date: Fri Feb 25 01:12:52 2005
New Revision: 155313
URL: http://svn.apache.org/viewcvs?view=rev&rev=155313
Log:
Some javadoc enhancements.
Modified:
james/server/branches/branch_2_1_fcs/src/java/org/apache/james/transport/mailets/ClamAVScan.java
Modified:
james/server/branches/branch_2_1_fcs/src/java/org/apache/james/transport/mailets/ClamAVScan.java
URL:
http://svn.apache.org/viewcvs/james/server/branches/branch_2_1_fcs/src/java/org/apache/james/transport/mailets/ClamAVScan.java?view=diff&r1=155312&r2=155313
==============================================================================
---
james/server/branches/branch_2_1_fcs/src/java/org/apache/james/transport/mailets/ClamAVScan.java
(original)
+++
james/server/branches/branch_2_1_fcs/src/java/org/apache/james/transport/mailets/ClamAVScan.java
Fri Feb 25 01:12:52 2005
@@ -47,7 +47,7 @@
/**
* <P>Does an antivirus scan check using a ClamAV daemon (CLAMD)</P>
*
- * <P> Interacts directly with the daemon using the <I>stream</I> method,
+ * <P> Interacts directly with the daemon using the "stream" method,
* which should have the lowest possible overhead.</P>
* <P>The CLAMD daemon will typically reside on <I>localhost</I>, but could
reside on a
* different host.
@@ -58,8 +58,8 @@
*
* <P>Handles the following init parameters:</P>
* <UL>
- * <LI><<CODE>debug</CODE>>.</LI>
- * <LI><<CODE>host</CODE>>: the host name of the server where CLAMD
runs. It can either be
+ * <LI><CODE><debug></CODE>.</LI>
+ * <LI><CODE><host></CODE>: the host name of the server where CLAMD
runs. It can either be
* a machine name, such as
* "<code>java.sun.com</code>", or a textual representation of its
* IP address. If a literal IP address is supplied, only the
@@ -67,13 +67,13 @@
* If the machine name resolves to multiple IP addresses,
<I>round-robin load sharing</I> will
* be used.
* The default is <CODE>localhost</CODE>.</LI>
- * <LI><<CODE>port</CODE>>: the port on which CLAMD listens. The
default is <I>3310</I>.</LI>
- * <LI><<CODE>maxPings</CODE>>: the maximum number of connection
retries during startup.
+ * <LI><CODE><port></CODE>: the port on which CLAMD listens. The
default is <I>3310</I>.</LI>
+ * <LI><CODE><maxPings></CODE>: the maximum number of connection
retries during startup.
* If the value is <I>0</I> no startup test will be done.
* The default is <I>6</I>.</LI>
- * <LI><<CODE>pingIntervalMilli</CODE>>: the interval between each
connection retry during startup.
+ * <LI><CODE><pingIntervalMilli></CODE>: the interval between each
connection retry during startup.
* The default is <I>30000</I> (30 seconds).</LI>
- * <LI><<CODE>streamBufferSize</CODE>>: the BufferedOutputStream
buffer size to use
+ * <LI><CODE><streamBufferSize></CODE>: the BufferedOutputStream
buffer size to use
* writing to the <I>stream connection</I>. The default is
<I>8192</I>.</LI>
* </UL>
*
@@ -82,11 +82,11 @@
* <LI>During initialization:</LI>
* <OL>
* <LI>Gets all <CODE>config.xml</CODE> parameters, handling the
defaults;</LI>
- * <LI>resolves the <CODE>host</CODE> parameter, creating the
round-robin IP list;</LI>
+ * <LI>resolves the <CODE><host></CODE> parameter, creating the
round-robin IP list;</LI>
* <LI>connects to CLAMD at the first IP in the round-robin list, on
- * the specified <CODE>port</CODE>;</LI>
- * <LI>if unsuccessful, retries every <CODE>pingIntervalMilli</CODE>
milliseconds up to
- * <CODE>maxPings</CODE> times;</LI>
+ * the specified <CODE><port></CODE>;</LI>
+ * <LI>if unsuccessful, retries every
<CODE><pingIntervalMilli></CODE> milliseconds up to
+ * <CODE><maxPings></CODE> times;</LI>
* <LI>sends a <CODE>PING</CODE> request;</LI>
* <LI>waits for a <CODE>PONG</CODE> answer;</LI>
* <LI>repeats steps 3-6 for every other IP resolved.
@@ -94,22 +94,22 @@
* <LI>For every mail</LI>
* <OL>
* <LI>connects to CLAMD at the "next" IP in the round-robin list, on
- * the specified <CODE>port</CODE>, and increments the "next" index;
+ * the specified <CODE><port></CODE>, and increments the
"next" index;
* if the connection request is not accepted tries with the next one
* in the list unless all of them have failed;</LI>
- * <LI>sends a <CODE>STREAM</CODE> request;</LI>
- * <LI>parses the <CODE>PORT <I>streamPort</I></CODE> answer obtaining
the port number;</LI>
+ * <LI>sends a "<CODE>STREAM</CODE>" request;</LI>
+ * <LI>parses the "<CODE>PORT <I>streamPort</I></CODE>" answer
obtaining the port number;</LI>
* <LI>makes a second connection (the <I>stream connection</I>) to
CLAMD at the same host (or IP)
* on the <I>streamPort</I> just obtained;</LI>
* <LI>sends the mime message to CLAMD (using [EMAIL PROTECTED]
MimeMessage#writeTo(OutputStream)})
* through the <I>stream connection</I>;</LI>
* <LI>closes the <I>stream connection</I>;</LI>
- * <LI>gets the <CODE>OK</CODE> or <CODE>FOUND</CODE> answer from the
main connection;</LI>
+ * <LI>gets the "<CODE>OK</CODE>" or "<CODE>... FOUND</CODE>" answer
from the main connection;</LI>
* <LI>closes the main connection;</LI>
- * <LI>sets the <CODE>org.apache.james.infected</CODE> <I>mail
attribute</I> to either
- * <CODE>true</CODE> or <CODE>false</CODE>;</LI>
- * <LI>adds the <CODE>X-MessageIsInfected</CODE> <I>header</I> to either
- * <CODE>true</CODE> or <CODE>false</CODE>;</LI>
+ * <LI>sets the "<CODE>org.apache.james.infected</CODE>" <I>mail
attribute</I> to either
+ * "<CODE>true</CODE>" or "<CODE>false</CODE>";</LI>
+ * <LI>adds the "<CODE>X-MessageIsInfected</CODE>" <I>header</I> to
either
+ * "<CODE>true</CODE>" or "<CODE>false</CODE>";</LI>
* </OL>
* </UL>
*
@@ -130,19 +130,25 @@
*
* ...
*
- * <mailet match="All" class="ClamAVScan" onMailetException="ignore">
+ * <!-- Do an antivirus scan -->
+ * <mailet match="All" class="ClamAVScan" onMailetException="ignore"/>
*
* <!-- If infected go to virus processor -->
* <mailet match="HasMailAttributeWithValue=org.apache.james.infected,
true" class="ToProcessor">
* <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">
+ * <processor> bad-extensions </processor>
+ * </mailet>
+ *
* ...
*
* <!-- Messages containing viruses -->
- *
- * <!-- To avoid a loop while bouncing -->
* <processor name="virus">
+ *
+ * <!-- To avoid a loop while bouncing -->
* <mailet match="All" class="SetMailAttribute">
* <org.apache.james.infected>true,
bouncing</org.apache.james.infected>
* </mailet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]