You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/08/23 20:35:52 UTC

svn commit: r688391 - in /james/mailet/standard/trunk/src/main/java/org/apache/james/transport: mailets/ matchers/

Author: bago
Date: Sat Aug 23 11:35:51 2008
New Revision: 688391

URL: http://svn.apache.org/viewvc?rev=688391&view=rev
Log:
A first pass to fix javadocs for better documentation generation.
Removed a couple of warnings (unnecessary cast + deprecated method)

Modified:
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddSubjectPrefix.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/OnlyText.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveAllMailAttributes.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMailAttribute.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ReplaceContent.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ServerTime.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMailAttribute.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMimeHeader.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ToProcessor.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UnwrapText.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHeader.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIs.java

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddHabeasWarrantMark.java Sat Aug 23 11:35:51 2008
@@ -26,11 +26,18 @@
 import org.apache.mailet.Mail ;
 
 /**
- * This matcher adds the Hebeas Warrant Mark to a message.
- * For details see: http://www.hebeas.com
+ * <p>This matcher adds the Hebeas Warrant Mark to a message.
+ * For details see: http://www.hebeas.com</p>
  *
- * Usage: <mailet match="<suitable-matcher>" class="AddHabeasWarrantMark" />
+ * <p>
+ * Usage:
+ * </p>
+ * 
+ * <pre><code>
+ * &lt;mailet match="&lt;suitable-matcher&gt;" class="AddHabeasWarrantMark" /&gt;
+ * </code></pre>
  *
+ * <p>
  * NOTE: Although this mailet is covered by the Apache Software License,
  * the Habeas Warrant Mark is copyright.  A separate license from Habeas
  * is required in order to legally attach the Habeas Warrant Mark to
@@ -40,7 +47,8 @@
  * 
  * Because the Habeas Warrant Mark is copyright material, I have asked
  * for and received the following explicit statement from Habeas:
- *
+ * </p>
+ * <pre>
  * -----------------------------------
  * From: Lindsey Pettit [mailto:support@habeas.com]
  * Sent: Sunday, September 29, 2002 5:51
@@ -71,7 +79,7 @@
  * 
  * That's absolutely perfect!
  * -----------------------------------
- *
+ * </pre>
  */
 
 public class AddHabeasWarrantMark extends GenericMailet

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddSubjectPrefix.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddSubjectPrefix.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddSubjectPrefix.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/AddSubjectPrefix.java Sat Aug 23 11:35:51 2008
@@ -33,10 +33,10 @@
  * <br>
  * 
  * Sample Configuration: <br>
- * <br>
+ * <pre><code>
  * &lt;mailet match="RecipientIs=robot@james.apache.org" class="TagMessage"&gt;
  * &lt;subjectPrefix&gt;[robot]&lt;/subjectPrefix&gt; &lt;/mailet&gt; <br>
- * <br>
+ * </code></pre>
  */
 public class AddSubjectPrefix extends GenericMailet {
 

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/MailAttributesToMimeHeaders.java Sat Aug 23 11:35:51 2008
@@ -32,16 +32,16 @@
 import org.apache.mailet.Mail;
 
 /**
- * Convert attributes to headers
- * 
- * Sample configuration:
+ * <p>Convert attributes to headers</p>
  * 
+ * <p>Sample configuration:</p>
+ * <pre><code>
  * &lt;mailet match="All" class="MailAttributesToMimeHeaders"&gt;
  * &lt;simplemapping&gt;org.apache.james.attribute1;
  * headerName1&lt;/simplemapping&gt;
  * &lt;simplemapping&gt;org.apache.james.attribute2;
  * headerName2&lt;/simplemapping&gt; &lt;/mailet&gt;
- * 
+ * </code></pre>
  */
 public class MailAttributesToMimeHeaders extends GenericMailet {
 

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/OnlyText.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/OnlyText.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/OnlyText.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/OnlyText.java Sat Aug 23 11:35:51 2008
@@ -35,9 +35,9 @@
 /**
  * Keep only the text part of a message.
  * <p>If the message is text only then it doesn't touch it, if it is a multipart it
- * transform it a in plain text message with the first text part found.
- * - text/plain
- * - text/html => with a conversion to text only
+ * transform it a in plain text message with the first text part found.<br>
+ * - text/plain<br>
+ * - text/html => with a conversion to text only<br>
  * - text/* as is.</p>
  */
 public class OnlyText extends GenericMailet {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveAllMailAttributes.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveAllMailAttributes.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveAllMailAttributes.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveAllMailAttributes.java Sat Aug 23 11:35:51 2008
@@ -29,7 +29,9 @@
  * This mailet sets removes all attributes set on the Mail instance
  * 
  * Sample configuration:
+ * <pre><code>
  * &lt;mailet match="All" class="RemoveAllMailAttributes"/&gt;
+ * </code></pre>
  *
  * @version CVS $Revision$ $Date$
  * @since 2.2.0

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMailAttribute.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMailAttribute.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMailAttribute.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMailAttribute.java Sat Aug 23 11:35:51 2008
@@ -33,10 +33,12 @@
  * This mailet sets attributes on the Mail.
  * 
  * Sample configuration:
+ * <pre><code>
  * &lt;mailet match="All" class="RemoveMailAttribute"&gt;
  *   &lt;name&gt;attribute_name1&lt;/name&gt;
  *   &lt;name&gt;attribute_name2&lt;/name&gt;
  * &lt;/mailet&gt;
+ * </code></pre>
  *
  * @version CVS $Revision$ $Date$
  * @since 2.2.0

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/RemoveMimeHeader.java Sat Aug 23 11:35:51 2008
@@ -36,10 +36,12 @@
  * 
  * Sample configuration:
  * 
+ * <pre><code>
  * &lt;mailet match="All" class="RemoveMimeHeader"&gt;
  * &lt;name&gt;header1&lt;/name&gt;
  * &lt;name&gt;header2&lt;/name&gt;
  * &lt;/mailet&gt;
+ * </code></pre>
  * 
  */
 public class RemoveMimeHeader extends GenericMailet {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ReplaceContent.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ReplaceContent.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ReplaceContent.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ReplaceContent.java Sat Aug 23 11:35:51 2008
@@ -42,38 +42,50 @@
  * Replace text contents
  * <p>This mailet allow to specific regular expression to replace text in subject and content.
  * 
+ * <p>
  * Each expression is defined as:
- * /REGEX_PATTERN/SUBSTITUTION_PATTERN/FLAGS/
+ * <code>/REGEX_PATTERN/SUBSTITUTION_PATTERN/FLAGS/</code>
+ * </p>
  * 
- * - REGEX_PATTERN is a regex used for the match
- * - SUBSTITUTION_PATTERN is a substitution pattern
- * - FLAGS flags supported for the pattern:
- *   i: case insensitive
- *   m: multi line
- *   x: extended (N/A)
- *   r: repeat - keep matching until a substitution is possible
- * 
- * To identify subject and body pattern we use the tags &lt;subjectPattern&gt; and &lt;bodyPattern&gt;
+ * <p>
+ * <code>REGEX_PATTERN</code> is a regex used for the match<br>
+ * <code>SUBSTITUTION_PATTERN</code> is a substitution pattern<br>
+ * <code>FLAGS</code> flags supported for the pattern:<br>
+ *   i: case insensitive<br>
+ *   m: multi line<br>
+ *   x: extended (N/A)<br>
+ *   r: repeat - keep matching until a substitution is possible<br>
+ * </p>
  * 
+ * <p>To identify subject and body pattern we use the tags &lt;subjectPattern&gt; and &lt;bodyPattern&gt;</p>
+ *
+ * <p>
  * Rules can be specified in external files.
  * Lines must be CRLF terminated and lines starting with # are considered commments.
  * Tags used to include external files are &lt;subjectPatternFile&gt; and 
  * &lt;bodyPatternFile&gt;
  * If file path starts with # then the file is loaded as a reasource.
+ * </p>
  * 
+ * <p>
  * Use of both files and direct patterns at the same time is allowed.
+ * </p>
  * 
+ * <p>
  * This mailet allow also to enforce the resulting charset for messages processed.
  * To do that the tag &lt;charset&gt; must be specified.
+ * </p>
  * 
+ * <p>
  * NOTE:
- * Regexp rules must be escaped by regexp excaping rules and applying this 2 additional rules:
+ * Regexp rules must be escaped by regexp excaping rules and applying this 2 additional rules:<br>
  * - "/" char inside an expression must be prefixed with "\":
- *   e.g: "/\//-//" replaces "/" with "-"
+ *   e.g: "/\//-//" replaces "/" with "-"<br>
  * - when the rules are specified using &lt;subjectPattern&gt; or &lt;bodyPattern&gt; and
  *   "/,/" has to be used in a pattern string it must be prefixed with a "\".
  *   E.g: "/\/\/,//" replaces "/" with "," (the rule would be "/\//,//" but the "/,/" must
- *   be escaped.
+ *   be escaped.<br>
+ * </p>
  */
 public class ReplaceContent extends GenericMailet {
     private static final String PARAMETER_NAME_SUBJECT_PATTERN = "subjectPattern";

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ServerTime.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ServerTime.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ServerTime.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ServerTime.java Sat Aug 23 11:35:51 2008
@@ -29,8 +29,10 @@
 
 /**
  * Returns the current time for the mail server.  Sample configuration:
- * <mailet match="RecipientIs=time@cadenza.lokitech.com" class="ServerTime">
- * </mailet>
+ * <pre><code>
+ * &lt;mailet match="RecipientIs=time@cadenza.lokitech.com" class="ServerTime"&gt;
+ * &lt;/mailet&gt;
+ * </code></pre>
  *
  */
 public class ServerTime extends GenericMailet {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMailAttribute.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMailAttribute.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMailAttribute.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMailAttribute.java Sat Aug 23 11:35:51 2008
@@ -32,13 +32,15 @@
 import javax.mail.MessagingException;
 
 /**
- * This mailet sets attributes on the Mail.
+ * <p>This mailet sets attributes on the Mail.</p>
  * 
- * Sample configuration:
+ * <p>Sample configuration:</p>
+ * <pre><code>
  * &lt;mailet match="All" class="SetMailAttribute"&gt;
  *   &lt;name1&gt;value1&lt;/name1&gt;
  *   &lt;name2&gt;value2&lt;/name2&gt;
  * &lt;/mailet&gt;
+ * </code></pre>
  *
  * @version CVS $Revision$ $Date$
  * @since 2.2.0

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMimeHeader.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMimeHeader.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMimeHeader.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/SetMimeHeader.java Sat Aug 23 11:35:51 2008
@@ -28,14 +28,16 @@
 import org.apache.mailet.Mail ;
 
 /**
- * Adds a specified header and value to the message.
+ * <p>Adds a specified header and value to the message.</p>
  *
- * Sample configuration:
+ * <p>Sample configuration:</p>
  *
- * <mailet match="All" class="AddHeader">
- *   <name>X-MailetHeader</name>
- *   <value>TheHeaderValue</value>
- * </mailet>
+ * <pre><code>
+ * &lt;mailet match="All" class="AddHeader"&gt;
+ *   &lt;name&gt;X-MailetHeader&lt;/name&gt;
+ *   &lt;value&gt;TheHeaderValue&lt;/value&gt;
+ * &lt;/mailet&gt;
+ * </code></pre>
  *
  * @version 1.0.0, 2002-09-11
  */

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ToProcessor.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ToProcessor.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ToProcessor.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/ToProcessor.java Sat Aug 23 11:35:51 2008
@@ -28,13 +28,15 @@
 import javax.mail.MessagingException;
 
 /**
- * This mailet redirects the mail to the named processor
+ * <p>This mailet redirects the mail to the named processor</p>
  *
- * Sample configuration:
- * <mailet match="All" class="ToProcessor">
- *   <processor>spam</processor>
- *   <notice>Notice attached to the message (optional)</notice>
- * </mailet>
+ * <p>Sample configuration:</p>
+ * <pre><code>
+ * &lt;mailet match="All" class="ToProcessor"&gt;
+ *   &lt;processor&gt;spam&lt;/processor&gt;
+ *   &lt;notice&gt;Notice attached to the message (optional)&lt;/notice&gt;
+ * &lt;/mailet&gt;
+ * </code></pre>
  *
  */
 public class ToProcessor extends GenericMailet {

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UnwrapText.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UnwrapText.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UnwrapText.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UnwrapText.java Sat Aug 23 11:35:51 2008
@@ -31,23 +31,26 @@
 import java.util.regex.Pattern;
 
 /**
- * Remove (best effort to) the hardcoded wrapping from a message.
- * <p>If the text is  "format=flowed" then deflows the text.
- * <p>Otherwise it forces a dewrap of the text.
- * <p>Parameters: quotewidth - when we try to dewrap e quoted text it helps knowing the original
+ * <p>Remove (best effort to) the hardcoded wrapping from a message.<br>
+ * If the text is  "format=flowed" then deflows the text. Otherwise it forces a dewrap of the text.
+ * </p>
+ * <p>Parameters:<br> 
+ * quotewidth - when we try to dewrap e quoted text it helps knowing the original
  * with, so we can reconstruct "wrapped wraps" created by multiple wrappings by clients with
  * different original width or simply to the add of the heading ">" that increase the line
- * length.
+ * length.<br>
  * The value should be "WIDTH+X" if the original length is known, "-X" otherwise.
  * In the latter case the length of the longer line will be used.
  * X is the tollerance needed for the quoting chars: if the original width is known the suggested
  * value for X is 2 (because of "> " prefix), otherwise it is suggested to increase it to a value 
- * like 10 (-10)
+ * like 10 (-10)</p>
  * 
- * In summary, if the original wrap is known (for example 76, for flowed messages)
- *  quotewidth = 78
- * Otherwise
- *  quotewidth = -10
+ * <p>
+ * In summary, if the original wrap is known (for example 76, for flowed messages)<br>
+ *  <code>quotewidth = 78</code><br>
+ * Otherwise<br>
+ *  <code>quotewidth = -10</code>
+ * </p>
  */
 public class UnwrapText extends GenericMailet {
     public final static String PARAMETER_NAME_QUOTEWIDTH = "quotewidth";

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java Sat Aug 23 11:35:51 2008
@@ -46,11 +46,11 @@
  * of the message.</p>
  *
  * <p>e.g.</p>
- * <pre>
- *    <mailet match="RecipientIs=forwarded@myhost"
- *            class="UseHeaderRecipients">
- *    </mailet>
- * </pre>
+ * <pre><code>
+ *    &lt;mailet match="RecipientIs=forwarded@myhost"
+ *            class="UseHeaderRecipients"&gt;
+ *    &lt;/mailet&gt;
+ * </code></pre>
  *
  * @version 1.0.0, 24/11/2000
  */

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHabeasWarrantMark.java Sat Aug 23 11:35:51 2008
@@ -29,20 +29,20 @@
 import java.util.Collection;
 
 /**
- * This matcher tests for the Hebeas Warrant Mark.
- * For details see: http://www.hebeas.com
- *
- * Usage: Place this matcher
- *
- * <mailet match="HasHabeasWarrantMark" class="ToProcessor">
- *     <processor> transport </processor>
- * </mailet>
- *
- * in the root processs before the DNSRBL block lists (the InSpammerBlacklist matcher).
- *
- * Because the Habeas Warrant Mark is copyright material, I have asked for and
- * received the following explicit statement from Habeas:
+ * <p>This matcher tests for the Hebeas Warrant Mark.
+ * For details see: http://www.hebeas.com</p>
  *
+ * <p>Usage: Place this matcher</p>
+ * <pre><code>
+ * &lt;mailet match="HasHabeasWarrantMark" class="ToProcessor"&gt;
+ *     &lt;processor&gt; transport &lt;/processor&gt;
+ * &lt;/mailet&gt;
+ * </code></pre>
+ * <p>in the root processs before the DNSRBL block lists (the InSpammerBlacklist matcher).</p>
+ *
+ * <p>Because the Habeas Warrant Mark is copyright material, I have asked for and
+ * received the following explicit statement from Habeas:</p>
+ * <pre>
  * -----------------------------------
  * From: Lindsey Pettit [mailto:support@habeas.com]
  * Sent: Sunday, September 29, 2002 5:51
@@ -63,7 +63,7 @@
  * do insist that it not ever be used as a basis for rejecting email which 
  * bears the Habeas mark.
  * -----------------------------------
- *
+ * </pre>
  */
 
 public class HasHabeasWarrantMark extends GenericMatcher

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHeader.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHeader.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHeader.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasHeader.java Sat Aug 23 11:35:51 2008
@@ -33,10 +33,10 @@
 import javax.mail.internet.MimeMessage;
 
 /**
- * use: <mailet match="{<header>[=value]}+" class="..." />
+ * use: <pre><code>&lt;mailet match="{&lt;header&gt;[=value]}+" class="..." /&gt;</code></pre>
  * 
- * This matcher checks if the header named is present. If complements the
- * AddHeader mailet.
+ * <p>This matcher checks if the header named is present. If complements the
+ * AddHeader mailet.</p>
  */
 public class HasHeader extends GenericMatcher {
 
@@ -56,7 +56,7 @@
 
     public Collection match(Mail mail) throws javax.mail.MessagingException {
         boolean match = false;
-        MimeMessage message = (MimeMessage) mail.getMessage();
+        MimeMessage message = mail.getMessage();
 
 
         header:

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIs.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIs.java?rev=688391&r1=688390&r2=688391&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIs.java (original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SenderHostIs.java Sat Aug 23 11:35:51 2008
@@ -30,13 +30,14 @@
 import java.util.StringTokenizer;
 
 /**
- * Checkes the sender's displayed domain name against a supplied list.
+ * <p>Checkes the sender's displayed domain name against a supplied list.</p>
  *
- * Sample configuration:
- *
- * <mailet match="SenderHostIs=domain.com" class="ToProcessor">
- *   <processor> spam </processor>
- * </mailet>
+ * <p>Sample configuration:</p>
+ * <pre><code>
+ * &lt;mailet match="SenderHostIs=domain.com" class="ToProcessor"&gt;
+ *   &lt;processor> spam &lt;/processor&gt;
+ * &lt;/mailet&gt;
+ * </code></pre>
  *
  * @version 1.0.0, 2002-09-10
  */
@@ -71,7 +72,7 @@
      */
     public Collection match(Mail mail) {
         try {
-            if (mail.getSender() != null && senderHosts.contains(mail.getSender().getHost().toLowerCase(Locale.US))) {
+            if (mail.getSender() != null && senderHosts.contains(mail.getSender().getDomain().toLowerCase(Locale.US))) {
                 return mail.getRecipients();
             }
         } catch (Exception e) {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org