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 ro...@apache.org on 2016/11/23 13:50:40 UTC
[37/46] james-project git commit: JAMES-1854 Mails with no more
recipients should be GHOSTed
JAMES-1854 Mails with no more recipients should be GHOSTed
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/830ced9a
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/830ced9a
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/830ced9a
Branch: refs/heads/master
Commit: 830ced9a2498728af104a3f149be367b00283067
Parents: 98b2dbb
Author: Benoit Tellier <bt...@linagora.com>
Authored: Sat Nov 19 01:35:43 2016 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Nov 23 18:19:35 2016 +0700
----------------------------------------------------------------------
.../apache/james/mailetcontainer/impl/camel/CamelProcessor.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/830ced9a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java
index fa71705..4113e6d 100644
--- a/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java
+++ b/server/mailet/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/impl/camel/CamelProcessor.java
@@ -90,6 +90,9 @@ public class CamelProcessor implements Processor {
MailetPipelineLogging.logEndOfMailetProcess(mailet, mail);
List<MailetProcessorListener> listeners = processor.getListeners();
long complete = System.currentTimeMillis() - start;
+ if (mail.getRecipients().isEmpty()) {
+ mail.setState(Mail.GHOST);
+ }
for (MailetProcessorListener listener : listeners) {
listener.afterMailet(mailet, mail.getName(), mail.getState(), complete, ex);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org