noel        2003/06/05 21:46:03

  Modified:    src/java/org/apache/james/transport/mailets
                        AbstractRedirect.java
  Log:
  Fix to prevent looping in the pipeline with DNS RBLs
  
  Revision  Changes    Path
  1.4       +10 -0     
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractRedirect.java     4 Jun 2003 00:38:46 -0000       1.3
  +++ AbstractRedirect.java     6 Jun 2003 04:46:03 -0000       1.4
  @@ -783,6 +783,16 @@
   
           // duplicates the Mail object, to be able to modify the new mail keeping 
the original untouched
           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.
  +        try {
  +            ((MailImpl) 
newMail).setRemoteAddr(java.net.InetAddress.getLocalHost().getHostAddress());
  +            ((MailImpl) 
newMail).setRemoteHost(java.net.InetAddress.getLocalHost().getHostName());
  +        } catch (java.net.UnknownHostException _) {
  +            ((MailImpl) newMail).setRemoteAddr("127.0.0.1");
  +            ((MailImpl) newMail).setRemoteHost("localhost");
  +        }
   
           if (isDebug) {
               MailImpl newMailImpl = (MailImpl) newMail;
  
  
  

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

Reply via email to