Author: norman
Date: Thu May 27 06:14:31 2010
New Revision: 948684
URL: http://svn.apache.org/viewvc?rev=948684&view=rev
Log:
We need to call the mailclaincheck before store the mail in the outgoing queue
to fix empty messages
Modified:
james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/mailets/AbstractRemoteDelivery.java
Modified:
james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/mailets/AbstractRemoteDelivery.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/mailets/AbstractRemoteDelivery.java?rev=948684&r1=948683&r2=948684&view=diff
==============================================================================
---
james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/mailets/AbstractRemoteDelivery.java
(original)
+++
james/server/trunk/spoolmanager/src/main/java/org/apache/james/transport/mailets/AbstractRemoteDelivery.java
Thu May 27 06:14:31 2010
@@ -150,6 +150,8 @@ public abstract class AbstractRemoteDeli
/** If false then ANY address errors will cause the transmission to fail */
private boolean sendPartial = false;
+ private String outgoingQueueInjectorEndpoint =
"direct:outgoingQueueInjectorEndpoint";
+
/**
* The amount of time JavaMail will wait before giving up on a socket
* connect()
@@ -585,7 +587,7 @@ public abstract class AbstractRemoteDeli
StringBuilder nameBuffer = new
StringBuilder(128).append(name).append("-to-").append(host);
m.setName(nameBuffer.toString());
- producerTemplate.sendBody("activemq:queue:" + outgoingQueue,
m);
+ producerTemplate.sendBody(outgoingQueueInjectorEndpoint, m);
// workRepository.store(mail);
// Set it to try to deliver (in a separate thread) immediately
// (triggered by storage)
@@ -597,7 +599,7 @@ public abstract class AbstractRemoteDeli
log(logMessageBuffer.toString());
}
- producerTemplate.sendBody("activemq:queue:" + outgoingQueue, mail);
+ producerTemplate.sendBody(outgoingQueueInjectorEndpoint, mail);
// Set it to try to deliver (in a separate thread) immediately
// (triggered by storage)
@@ -1552,6 +1554,10 @@ public abstract class AbstractRemoteDeli
@Override
public void configure() throws Exception {
+
+ // we need to store the message to offsite storage so use
claimcheck
+
from(outgoingQueueInjectorEndpoint).inOnly().beanRef("mailClaimCheck").to(getOutgoingQueueEndpoint(outgoingQueue));
+
from(getOutgoingQueueEndpoint(outgoingQueue)).inOnly().transacted()
.beanRef("mailEnricher")
.process(new
DeliveryProcessor()).choice().when(header(JamesCamelConstants.JAMES_RETRY_DELIVERY).isNotNull()).to(getOutgoingRetryQueueEndpoint(outgoingRetryQueue)).otherwise().beanRef("mailClaimCheck").process(disposeProcessor).stop().end();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]