noel        2003/06/06 16:55:05

  Modified:    src/java/org/apache/james/transport/mailets Tag:
                        branch_2_1_fcs AbstractNotify.java
                        AbstractRedirect.java Bounce.java Forward.java
                        NotifyPostmaster.java NotifySender.java
                        Redirect.java
  Log:
  Enhanced the javadocs.  Fix in AbstractRedirect to avoid re-rendering a message that 
we aren't changing.  Check for valid Sender domain moved to AbstractRedirect.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +11 -12    
jakarta-james/src/java/org/apache/james/transport/mailets/AbstractNotify.java
  
  Index: AbstractNotify.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/AbstractNotify.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- AbstractNotify.java       3 Jun 2003 05:16:41 -0000       1.1.2.2
  +++ AbstractNotify.java       6 Jun 2003 23:55:04 -0000       1.1.2.3
  @@ -110,11 +110,11 @@
    *
    */
   public abstract class AbstractNotify extends AbstractRedirect {
  -    
  +
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
        * @return true, as all notifications should
        */
  @@ -128,14 +128,14 @@
       protected int getInLineType() {
           return NONE;
       }
  -    
  +
       /**
        * @return <CODE>MESSAGE</CODE>
        */
       protected int getAttachmentType() {
           return MESSAGE;
       }
  -    
  +
       /**
        * @return the <CODE>notice</CODE> init parameter
        */
  @@ -146,7 +146,7 @@
               return getInitParameter("notice");
           }
       }
  -    
  +
       /**
        * @return the full message to append, built from the Mail object
        */
  @@ -154,7 +154,7 @@
           MimeMessage message = originalMail.getMessage();
           StringWriter sout = new StringWriter();
           PrintWriter out = new PrintWriter(sout, true);
  -        
  +
           // First add the "local" notice
           // (either from conf or generic error message)
           out.println(getMessage());
  @@ -208,10 +208,10 @@
           if (message.getLineCount() >= 0) {
               out.println("  Number of lines: " + message.getLineCount());
           }
  -        
  +
           return sout.toString();
       }
  -    
  +
       /**
        * @return the value of the <CODE>sendingAddress</CODE> init parameter if not 
null,
        * the postmaster address otherwise
  @@ -223,7 +223,7 @@
               return new MailAddress(getInitParameter("sendingAddress"));
           }
       }
  -    
  +
       /**
        * @return the <CODE>attachStackTrace</CODE> init parameter
        */
  @@ -236,7 +236,7 @@
           }
           return attachStackTrace;
       }
  -    
  +
       /**
        * @return true
        */
  @@ -247,6 +247,5 @@
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  -    
  -}
   
  +}
  
  
  
  1.1.2.6   +64 -31    
jakarta-james/src/java/org/apache/james/transport/mailets/AbstractRedirect.java
  
  Index: AbstractRedirect.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/AbstractRedirect.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- AbstractRedirect.java     6 Jun 2003 04:43:41 -0000       1.1.2.5
  +++ AbstractRedirect.java     6 Jun 2003 23:55:04 -0000       1.1.2.6
  @@ -298,11 +298,11 @@
        * May return one of the following values to indicate how to append the 
original message
        * to build the new message:
        * <ul>
  -     *    <li>UNALTERED : original message is the new message body</li>
  -     *    <li>BODY : original message body is appended to the new message</li>
  -     *    <li>HEADS : original message headers are appended to the new message</li>
  -     *    <li>ALL : original is appended with all headers</li>
  -     *    <li>NONE : original is not appended</li>
  +     *    <li><CODE>UNALTERED</CODE> : original message is the new message body</li>
  +     *    <li><CODE>BODY</CODE> : original message body is appended to the new 
message</li>
  +     *    <li><CODE>HEADS</CODE> : original message headers are appended to the new 
message</li>
  +     *    <li><CODE>ALL</CODE> : original is appended with all headers</li>
  +     *    <li><CODE>NONE</CODE> : original is not appended</li>
        * </ul>
        * Is a "getX()" method.
        *
  @@ -317,23 +317,22 @@
        * built dynamically using the original Mail object.
        * Is a "getX(Mail)" method.
        *
  -     * @return [EMAIL PROTECTED] #getInlineType()}
  +     * @return [EMAIL PROTECTED] #getInLineType()}
        */
       protected int getInLineType(Mail originalMail) throws MessagingException {
           int inLineType = (isStatic()) ? this.inLineType : getInLineType();
           return inLineType;
       }
   
  -    /**
  -     * Gets the <CODE>attachment</CODE> property.
  +    /** Gets the <CODE>attachment</CODE> property.
        * May return one of the following values to indicate how to attach the 
original message
        * to the new message:
        * <ul>
  -     *    <li>BODY : original message body is attached as plain text to the new 
message</li>
  -     *    <li>HEADS : original message headers are attached as plain text to the 
new message</li>
  -     *    <li>ALL : original is attached as plain text with all headers</li>
  -     *    <li>MESSAGE : original message is attached as type message/rfc822, a 
complete mail message.</li>
  -     *    <li>false : original is not attached</li>
  +     *    <li><CODE>BODY</CODE> : original message body is attached as plain text 
to the new message</li>
  +     *    <li><CODE>HEADS</CODE> : original message headers are attached as plain 
text to the new message</li>
  +     *    <li><CODE>ALL</CODE> : original is attached as plain text with all 
headers</li>
  +     *    <li><CODE>MESSAGE</CODE> : original message is attached as type 
message/rfc822, a complete mail message.</li>
  +     *    <li><CODE>NONE</CODE> : original is not attached</li>
        * </ul>
        * Is a "getX()" method.
        *
  @@ -396,7 +395,7 @@
        * built dynamically using the original Mail object.
        * Is a "getX(Mail)" method.
        *
  -     * @return [EMAIL PROTECTED] #getRecipients()}, replacing SENDER if applicable
  +     * @return [EMAIL PROTECTED] #getRecipients()}, replacing 
<CODE>SpecialAddress.SENDER</CODE> if applicable
        */
       protected Collection getRecipients(Mail originalMail) throws MessagingException 
{
           Collection recipients = (isStatic()) ? this.recipients : getRecipients();
  @@ -450,7 +449,7 @@
        * built dynamically using the original Mail object.
        * Is a "getX(Mail)" method.
        *
  -     * @return [EMAIL PROTECTED] #getTo()}, replacing SENDER and UNALTERED if 
applicable
  +     * @return [EMAIL PROTECTED] #getTo()}, replacing 
<CODE>SpecialAddress.SENDER</CODE> and <CODE>SpecialAddress.UNALTERED</CODE> if 
applicable
        */
       protected InternetAddress[] getTo(Mail originalMail) throws MessagingException {
           InternetAddress[] apparentlyTo = (isStatic()) ? this.apparentlyTo : getTo();
  @@ -494,7 +493,7 @@
        * or null if no change is requested.
        * Is a "getX()" method.
        *
  -     * @return
  +     * @return null
        */
       protected MailAddress getReplyTo() throws MessagingException {
           return null;
  @@ -543,7 +542,7 @@
        * built dynamically using the original Mail object.
        * Is a "getX(Mail)" method.
        *
  -     * @return [EMAIL PROTECTED] #getReturnPath()}, replacing SENDER if applicable, 
but not replacing NULL
  +     * @return [EMAIL PROTECTED] #getReturnPath()}, replacing 
<CODE>SpecialAddress.SENDER</CODE> if applicable, but not replacing 
<CODE>SpecialAddress.NULL</CODE>
        */
       protected MailAddress getReturnPath(Mail originalMail) throws 
MessagingException {
           MailAddress returnPath = (isStatic()) ? this.returnPath : getReturnPath();
  @@ -725,8 +724,7 @@
       /**
        * Mailet initialization routine.
        * Will setup static values for each "x" initialization parameter in config.xml,
  -     * using getX(), if isStatic() returns true.
  -     *
  +     * using getX(), if [EMAIL PROTECTED] #isStatic()} returns true.
        */
       public void init() throws MessagingException {
           if (isDebug) {
  @@ -779,10 +777,10 @@
        */
       public void service(Mail originalMail) throws MessagingException {
   
  -        boolean keepMessageId = false;
  +//        boolean keepMessageId = false;
   
           // duplicates the Mail object, to be able to modify the new mail keeping 
the original untouched
  -        Mail newMail = ((MailImpl) 
originalMail).duplicate(newName((MailImpl)originalMail));
  +        Mail newMail = ((MailImpl) originalMail).duplicate(newName((MailImpl) 
originalMail));
           // We don't need to use the original Remote Address and Host,
           // and doing so would likely cause a loop with spam detecting
           // matchers.
  @@ -822,12 +820,19 @@
           } else {
               // if we need the original, create a copy of this message to redirect
               if (getPassThrough(originalMail)) {
  -                newMail.setMessage(new MimeMessage(originalMail.getMessage()));
  +                newMail.setMessage(new MimeMessage(originalMail.getMessage()) {
  +                    protected void updateHeaders() throws MessagingException {
  +                        if (getMessageID() == null) super.updateHeaders();
  +                        else {
  +                            modified = false;
  +                        }
  +                    }
  +                });
               }
               if (isDebug) {
                   log("Message resent unaltered.");
               }
  -            keepMessageId = true;
  +//            keepMessageId = true;
           }
   
           //Set additional headers
  @@ -850,13 +855,25 @@
   
           newMail.getMessage().saveChanges();
   
  -        if (keepMessageId) {
  -            setMessageId(newMail, originalMail);
  +//        if (keepMessageId) {
  +//            setMessageId(newMail, originalMail);
  +//        }
  +
  +        if (senderDomainIsValid(newMail)) {
  +            //Send it off...
  +            getMailetContext().sendMail(newMail);
  +        } else {
  +            StringBuffer logBuffer = new StringBuffer(256)
  +                                    .append(getMailetName())
  +                                    .append(" mailet cannot forward ")
  +                                    .append(((MailImpl) originalMail).getName())
  +                                    .append(". Invalid sender domain for ")
  +                                    .append(newMail.getSender())
  +                                    .append(". Consider using the Redirect mailet ")
  +                                    .append("using a different sender.");
  +            log(logBuffer.toString());
           }
   
  -        //Send it off...
  -        getMailetContext().sendMail(newMail);
  -
           if(!getPassThrough(originalMail)) {
               originalMail.setState(Mail.GHOST);
           }
  @@ -868,7 +885,6 @@
        * Create a unique new primary key name.
        *
        * @param mail the mail to use as the basis for the new mail name
  -     *
        * @return a new name
        */
       private String newName(MailImpl mail) {
  @@ -884,7 +900,6 @@
        * A private method to convert types from string to int.
        *
        * @param param the string type
  -     *
        * @return the corresponding int enumeration
        */
       protected int getTypeCode(String param) {
  @@ -913,7 +928,8 @@
       /**
        * Gets the MailAddress corresponding to the existing "Return-Path" header of
        * <I>mail</I>.
  -     * If empty returns NULL, if missing return SENDER.
  +     * If empty returns <CODE>SpecialAddress.NULL</CODE>,
  +     * if missing return <CODE>SpecialAddress.SENDER</CODE>.
        */
       protected MailAddress getExistingReturnPath(Mail mail) throws 
MessagingException {
           MailAddress mailAddress = null;
  @@ -1224,5 +1240,22 @@
           }
   
           return specialAddress;
  +    }
  +
  +    /**
  +     * <P>Checks if a sender domain of <I>mail</I> is valid.
  +     * It is valid if the sender is null or
  +     * [EMAIL PROTECTED] org.apache.mailet.MailetContext#getMailServers} returns 
true for
  +     * the sender host part.</P>
  +     * <P>If we do not do this check, and someone uses a redirection mailet in a
  +     * processor initiated by SenderInFakeDomain, then a fake
  +     * sender domain will cause an infinite loop (the forwarded
  +     * e-mail still appears to come from a fake domain).<BR>
  +     * Although this can be viewed as a configuration error, the
  +     * consequences of such a mis-configuration are severe enough
  +     * to warrant protecting against the infinite loop.</P>
  +     */
  +    protected final boolean senderDomainIsValid(Mail mail) {
  +        return mail.getSender() == null || 
getMailetContext().getMailServers(mail.getSender().getHost()).size() != 0;
       }
   }
  
  
  
  1.1.2.3   +13 -12    
jakarta-james/src/java/org/apache/james/transport/mailets/Bounce.java
  
  Index: Bounce.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/Bounce.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Bounce.java       3 Jun 2003 05:16:41 -0000       1.1.2.2
  +++ Bounce.java       6 Jun 2003 23:55:04 -0000       1.1.2.3
  @@ -58,6 +58,7 @@
   
   package org.apache.james.transport.mailets;
   
  +import org.apache.james.util.RFC2822Headers;
   import org.apache.mailet.GenericMailet;
   import org.apache.mailet.Mail;
   import org.apache.mailet.MailAddress;
  @@ -92,9 +93,9 @@
    * meaning that no reply should be sent.</P>
    * <P>A sender of the notification message can optionally be specified.
    * If one is not specified, the postmaster's address will be used.<BR>
  - * A notice text can be specified, and in such case will be inserted into the 
  + * A notice text can be specified, and in such case will be inserted into the
    * notification inline text.<BR>
  - * If the notified message has an "error message" set, it will be inserted into the 
  + * If the notified message has an "error message" set, it will be inserted into the
    * notification inline text. If the <CODE>attachStackTrace</CODE> init parameter
    * is set to true, such error message will be attached to the notification 
message.<BR>
    * <P>passThrough is <B>true</B>.</P>
  @@ -127,7 +128,7 @@
    *
    */
   public class Bounce extends AbstractNotify {
  -    
  +
       /**
        * Return a string describing this mailet.
        *
  @@ -140,36 +141,36 @@
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
  -     * @return SpecialAddress.RETURN_PATH
  +     * @return <CODE>SpecialAddress.RETURN_PATH</CODE>
        */
       protected Collection getRecipients() {
           Collection newRecipients = new HashSet();
           newRecipients.add(SpecialAddress.RETURN_PATH);
           return newRecipients;
       }
  -        
  +
       /**
  -     * @return SpecialAddress.RETURN_PATH
  +     * @return <CODE>SpecialAddress.RETURN_PATH</CODE>
        */
       protected InternetAddress[] getTo() {
           InternetAddress[] apparentlyTo = new InternetAddress[1];
           apparentlyTo[0] = SpecialAddress.RETURN_PATH.toInternetAddress();
           return apparentlyTo;
       }
  -    
  +
       /**
  -     * @return NULL (the meaning of bounce)
  +     * @return <CODE>SpecialAddress.NULL</CODE> (the meaning of bounce)
        */
       protected MailAddress getReturnPath() {
           return SpecialAddress.NULL;
       }
  -    
  +
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  -    
  +
       /**
        * Service does the hard work,and redirects the originalMail in the form 
specified.
        * Checks that the original return path is not empty,
  @@ -192,6 +193,6 @@
           }
           super.service(originalMail);
       }
  -    
  +
   }
   
  
  
  
  1.6.4.4   +2 -34     
jakarta-james/src/java/org/apache/james/transport/mailets/Forward.java
  
  Index: Forward.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/Forward.java,v
  retrieving revision 1.6.4.3
  retrieving revision 1.6.4.4
  diff -u -r1.6.4.3 -r1.6.4.4
  --- Forward.java      2 Jun 2003 22:37:08 -0000       1.6.4.3
  +++ Forward.java      6 Jun 2003 23:55:04 -0000       1.6.4.4
  @@ -99,11 +99,11 @@
       public String getMailetInfo() {
           return "Forward Mailet";
       }
  -    
  +
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
        * @return the <CODE>recipients</CODE> init parameter or null if missing
        */
  @@ -128,38 +128,6 @@
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  -    
  -    /**
  -     * Forwards a mail to a particular recipient.
  -     *
  -     * @param mail the mail being processed
  -     *
  -     * @throws MessagingException if an error occurs while forwarding the mail
  -     */
  -    public void service(Mail mail) throws MessagingException {
  -       if (mail.getSender() == null || 
getMailetContext().getMailServers(mail.getSender().getHost()).size() != 0) {
  -           // If we do not do this check, and somone uses Forward in a
  -           // processor initiated by SenderInFakeDomain, then a fake
  -           // sender domain will cause an infinite loop (the forwarded
  -           // e-mail still appears to come from a fake domain).
  -           // Although this can be viewed as a configuration error, the
  -           // consequences of such a mis-configuration are severe enough
  -           // to warrant protecting against the infinite loop.
  -           super.service(mail);
  -       }
  -       else {
  -           StringBuffer logBuffer = new StringBuffer(256)
  -                                   .append("Forward mailet cannot forward ")
  -                                   .append(mail)
  -                                   .append(". Invalid sender domain for ")
  -                                   .append(mail.getSender())
  -                                   .append(". Consider using the Redirect mailet.");
  -           log(logBuffer.toString());
  -       }
  -       if(! (new Boolean(getInitParameter("passThrough"))).booleanValue()) {
  -            mail.setState(Mail.GHOST);
  -       }
  -    }
   
   }
   
  
  
  
  1.9.4.5   +10 -10    
jakarta-james/src/java/org/apache/james/transport/mailets/NotifyPostmaster.java
  
  Index: NotifyPostmaster.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/NotifyPostmaster.java,v
  retrieving revision 1.9.4.4
  retrieving revision 1.9.4.5
  diff -u -r1.9.4.4 -r1.9.4.5
  --- NotifyPostmaster.java     3 Jun 2003 05:16:41 -0000       1.9.4.4
  +++ NotifyPostmaster.java     6 Jun 2003 23:55:04 -0000       1.9.4.5
  @@ -86,9 +86,9 @@
    * If one is not specified, the postmaster's address will be used.<BR>
    * The "To:" header of the notification message can be set to "unaltered";
    * if missing will be set to the postmaster.<BR>
  - * A notice text can be specified, and in such case will be inserted into the 
  + * A notice text can be specified, and in such case will be inserted into the
    * notification inline text.<BR>
  - * If the notified message has an "error message" set, it will be inserted into the 
  + * If the notified message has an "error message" set, it will be inserted into the
    * notification inline text. If the <CODE>attachStackTrace</CODE> init parameter
    * is set to true, such error message will be attached to the notification 
message.<BR>
    * The notified messages are attached in their entirety (headers and
  @@ -124,7 +124,7 @@
    *
    */
   public class NotifyPostmaster extends AbstractNotify {
  -    
  +
       /**
        * Return a string describing this mailet.
        *
  @@ -136,7 +136,7 @@
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
        * @return the postmaster address
        */
  @@ -145,9 +145,9 @@
           newRecipients.add(getMailetContext().getPostmaster());
           return newRecipients;
       }
  -    
  +
       /**
  -     * @return UNALTERED if specified or postmaster if missing
  +     * @return <CODE>SpecialAddress.UNALTERED</CODE> if specified or postmaster if 
missing
        */
       protected InternetAddress[] getTo() throws MessagingException {
           String addressList = getInitParameter("to");
  @@ -164,14 +164,14 @@
           }
           return iaarray;
       }
  -    
  +
       /**
        * @return "Re:"
        */
       protected String getSubjectPrefix() {
           return "Re:";
       }
  -    
  +
       /**
        * Builds the subject of <I>newMail</I> appending the subject
        * of <I>originalMail</I> to <I>subjectPrefix</I>, but avoiding a duplicate.
  @@ -187,10 +187,10 @@
               newMail.getMessage().setSubject(subjectPrefix + subject);
           }
       }
  -    
  +
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  -    
  +
   }
   
  
  
  
  1.10.4.6  +7 -7      
jakarta-james/src/java/org/apache/james/transport/mailets/NotifySender.java
  
  Index: NotifySender.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/NotifySender.java,v
  retrieving revision 1.10.4.5
  retrieving revision 1.10.4.6
  diff -u -r1.10.4.5 -r1.10.4.6
  --- NotifySender.java 3 Jun 2003 05:16:41 -0000       1.10.4.5
  +++ NotifySender.java 6 Jun 2003 23:55:04 -0000       1.10.4.6
  @@ -124,7 +124,7 @@
    *
    */
   public class NotifySender extends AbstractNotify {
  -    
  +
       /**
        * Return a string describing this mailet.
        *
  @@ -133,22 +133,22 @@
       public String getMailetInfo() {
           return "NotifySender Mailet";
       }
  -    
  +
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
  -     * @return SENDER, indicating the sender of the current mail
  +     * @return <CODE>SpecialAddress.SENDER</CODE>, indicating the sender of the 
current mail
        */
       protected Collection getRecipients() {
           Collection newRecipients = new HashSet();
           newRecipients.add(SpecialAddress.SENDER);
           return newRecipients;
       }
  -    
  +
       /**
  -     * @return UNALTERED if specified or SENDER if missing
  +     * @return <CODE>SpecialAddress.UNALTERED</CODE> if specified or 
<CODE>SpecialAddress.SENDER</CODE> if missing
        */
       protected InternetAddress[] getTo() throws MessagingException {
           String addressList = getInitParameter("to");
  @@ -165,7 +165,7 @@
           }
           return iaarray;
       }
  -    
  +
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  
  
  
  1.18.4.9  +16 -16    
jakarta-james/src/java/org/apache/james/transport/mailets/Redirect.java
  
  Index: Redirect.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/Redirect.java,v
  retrieving revision 1.18.4.8
  retrieving revision 1.18.4.9
  diff -u -r1.18.4.8 -r1.18.4.9
  --- Redirect.java     3 Jun 2003 05:16:42 -0000       1.18.4.8
  +++ Redirect.java     6 Jun 2003 23:55:04 -0000       1.18.4.9
  @@ -235,7 +235,7 @@
    */
   
   public class Redirect extends AbstractRedirect {
  -            
  +
       /**
        * Returns a string describing this mailet.
        *
  @@ -248,7 +248,7 @@
       /* ******************************************************************** */
       /* ****************** Begin of getX and setX methods ****************** */
       /* ******************************************************************** */
  -    
  +
       /**
        * @return the <CODE>static</CODE> init parameter
       */
  @@ -290,8 +290,8 @@
       }
   
       /**
  -     * @return the <CODE>recipients</CODE> init parameter or SpecialAddress.SENDER
  -     * or SpecialAddress.RETURN_PATH or null if missing
  +     * @return the <CODE>recipients</CODE> init parameter or 
<CODE>SpecialAddress.SENDER</CODE>
  +     * or <CODE>SpecialAddress.RETURN_PATH</CODE> or null if missing
        */
       protected Collection getRecipients() throws MessagingException {
           Collection newRecipients = new HashSet();
  @@ -302,7 +302,7 @@
           if (addressList == null) {
               return null;
           }
  -        
  +
           MailAddress specialAddress = getSpecialAddress(addressList,
                                           new String[] {"postmaster", "sender", 
"returnPath"});
           if (specialAddress != null) {
  @@ -322,8 +322,8 @@
       }
   
       /**
  -     * @return the <CODE>to</CODE> init parameter or SpecialAddress.SENDER
  -     * or SpecialAddress.RETURN_PATH or SpecialAddress.UNALTERED or null if missing
  +     * @return the <CODE>to</CODE> init parameter or 
<CODE>SpecialAddress.SENDER</CODE>
  +     * or S<CODE>pecialAddress.RETURN_PATH</CODE> or 
<CODE>SpecialAddress.UNALTERED</CODE> or null if missing
        */
       protected InternetAddress[] getTo() throws MessagingException {
           String addressList = (getInitParameter("to") == null)
  @@ -372,20 +372,20 @@
                   }
                   return specialAddress;
               }
  -            
  +
               try {
                   return new MailAddress(addressString);
               } catch(Exception e) {
                   log("Parse error in getReplyTo: " + addressString);
               }
           }
  -        
  +
           return null;
       }
   
       /**
  -     * @return the <CODE>returnPath</CODE> init parameter or SpecialAddress.NULL
  -     * or SpecialAddress.SENDER or null if missing
  +     * @return the <CODE>returnPath</CODE> init parameter or 
<CODE>SpecialAddress.NULL</CODE>
  +     * or <CODE>SpecialAddress.SENDER</CODE> or null if missing
        */
       protected MailAddress getReturnPath() throws MessagingException {
           String addressString = getInitParameter("returnPath");
  @@ -395,14 +395,14 @@
               if (specialAddress != null) {
                   return specialAddress;
               }
  -            
  +
               try {
                   return new MailAddress(addressString);
               } catch(Exception e) {
                   log("Parse error in getReturnPath: " + addressString);
               }
           }
  -        
  +
           return null;
       }
   
  @@ -421,7 +421,7 @@
                   }
                   return specialAddress;
               }
  -            
  +
               try {
                   return new MailAddress(addressString);
               } catch(Exception e) {
  @@ -463,9 +463,9 @@
           }
           return new Boolean(getInitParameter("isReply")).booleanValue();
       }
  -    
  +
       /* ******************************************************************** */
       /* ******************* End of getX and setX methods ******************* */
       /* ******************************************************************** */
  -    
  +
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to