danny 2002/09/27 07:08:00
Modified: src/java/org/apache/james/transport/matchers
FetchedFrom.java
Log:
matcher strips header to prevent looping, this may be a bad idea, but will allow
docs to get written in time.
Revision Changes Path
1.2 +3 -1
jakarta-james/src/java/org/apache/james/transport/matchers/FetchedFrom.java
Index: FetchedFrom.java
===================================================================
RCS file:
/home/cvs/jakarta-james/src/java/org/apache/james/transport/matchers/FetchedFrom.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FetchedFrom.java 27 Sep 2002 12:03:59 -0000 1.1
+++ FetchedFrom.java 27 Sep 2002 14:08:00 -0000 1.2
@@ -17,6 +17,7 @@
* Matches mail with a header set by Fetchpop X-fetched-from <br>
* fetchpop sets X-fetched-by to the "name" of the fetchpop fetch task.<br>
* This is used to match all mail fetched from a specific pop account.
+ * Once the condition is met the header is stripped from the message to prevent
looping if the mail is re-inserted into the spool.
* @author <A href="mailto:[EMAIL PROTECTED]">Danny Angus</a>
*
* $Id$
@@ -27,6 +28,7 @@
MimeMessage message = mail.getMessage();
String fetch = message.getHeader("X-fetched-from", null);
if (fetch != null && fetch.equals(getCondition())) {
+ mail.getMessage().removeHeader("X-fetched-from");
return mail.getRecipients();
}
return null;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>