noel 2003/06/05 21:43:41
Modified: src/java/org/apache/james/transport/mailets Tag:
branch_2_1_fcs AbstractRedirect.java
Log:
Fix to prevent looping in the pipeline with DNS RBLs
Revision Changes Path
No revision
No revision
1.1.2.5 +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.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- AbstractRedirect.java 4 Jun 2003 00:38:18 -0000 1.1.2.4
+++ AbstractRedirect.java 6 Jun 2003 04:43:41 -0000 1.1.2.5
@@ -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]