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 bt...@apache.org on 2018/07/25 02:59:10 UTC
[29/29] james-project git commit: JAMES-2469 relay-allowed composite
matcher
JAMES-2469 relay-allowed composite matcher
This is more elegant, and less verbose than duplicated mailet pairs. Moreover,
it comes up with a boot performance improvement.
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/aaf12995
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/aaf12995
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/aaf12995
Branch: refs/heads/master
Commit: aaf12995828d905310efe4e16f3cb9686fca9999
Parents: c84f10f
Author: benwa <bt...@linagora.com>
Authored: Tue Jul 17 10:24:07 2018 +0700
Committer: benwa <bt...@linagora.com>
Committed: Wed Jul 25 09:35:49 2018 +0700
----------------------------------------------------------------------
.../destination/conf/mailetcontainer.xml | 18 +++++++---------
.../destination/conf/mailetcontainer.xml | 20 +++++++-----------
.../jpa/destination/conf/mailetcontainer.xml | 18 +++++++---------
.../spring/destination/conf/mailetcontainer.xml | 17 +++++++--------
.../src/test/resources/mailetcontainer.xml | 19 ++++++++---------
.../src/test/resources/mailetcontainer.xml | 8 ++++++-
.../src/test/resources/mailetcontainer.xml | 8 ++++++-
.../src/test/resources/mailetcontainer.xml | 14 ++++++-------
.../sample-configuration/mailetcontainer.xml | 15 ++++++-------
.../sample-configuration/mailetcontainer.xml | 15 ++++++-------
.../sample-configuration/mailetcontainer.xml | 18 +++++++---------
.../src/test/resources/mailetcontainer.xml | 22 ++++++++------------
.../src/test/resources/mailetcontainer.xml | 19 ++++++++---------
.../src/test/resources/mailetcontainer.xml | 16 +++++++-------
14 files changed, 110 insertions(+), 117 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/dockerfiles/run/guice/cassandra-ldap/destination/conf/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/cassandra-ldap/destination/conf/mailetcontainer.xml b/dockerfiles/run/guice/cassandra-ldap/destination/conf/mailetcontainer.xml
index 4034ed7..353dea9 100644
--- a/dockerfiles/run/guice/cassandra-ldap/destination/conf/mailetcontainer.xml
+++ b/dockerfiles/run/guice/cassandra-ldap/destination/conf/mailetcontainer.xml
@@ -49,6 +49,13 @@
</processor>
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -75,16 +82,7 @@
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="ToProcessor">
- <processor>relay</processor>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="ToProcessor">
- <processor>relay</processor>
- </mailet>
- <mailet match="org.apache.james.jmap.mailet.SentByJmap" class="ToProcessor">
- <processor>relay</processor>
- </mailet>
- <mailet match="SentByMailet" class="ToProcessor">
+ <mailet match="relay-allowed" class="ToProcessor">
<processor>relay</processor>
</mailet>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/dockerfiles/run/guice/cassandra/destination/conf/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/cassandra/destination/conf/mailetcontainer.xml b/dockerfiles/run/guice/cassandra/destination/conf/mailetcontainer.xml
index 55b0950..a8de354 100644
--- a/dockerfiles/run/guice/cassandra/destination/conf/mailetcontainer.xml
+++ b/dockerfiles/run/guice/cassandra/destination/conf/mailetcontainer.xml
@@ -49,6 +49,12 @@
</processor>
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -75,19 +81,7 @@
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="org.apache.james.jmap.mailet.SentByJmap" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="ToProcessor">
+ <mailet match="relay-allowed" class="ToProcessor">
<processor>relay</processor>
</mailet>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/dockerfiles/run/guice/jpa/destination/conf/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/jpa/destination/conf/mailetcontainer.xml b/dockerfiles/run/guice/jpa/destination/conf/mailetcontainer.xml
index 88bf3c9..27bbd4b 100644
--- a/dockerfiles/run/guice/jpa/destination/conf/mailetcontainer.xml
+++ b/dockerfiles/run/guice/jpa/destination/conf/mailetcontainer.xml
@@ -49,6 +49,12 @@
</processor>
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -74,19 +80,9 @@
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="ToProcessor">
- <processor>relay</processor>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="ToProcessor">
- <processor>relay</processor>
- </mailet>
- <mailet match="SentByMailet" class="ToProcessor">
+ <mailet match="relay-allowed" class="ToProcessor">
<processor>relay</processor>
</mailet>
-
- <mailet match="All" class="ToProcessor">
- <processor>relay-denied</processor>
- </mailet>
</processor>
<processor state="relay" enableJmx="true">
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/dockerfiles/run/spring/destination/conf/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/dockerfiles/run/spring/destination/conf/mailetcontainer.xml b/dockerfiles/run/spring/destination/conf/mailetcontainer.xml
index d978697..9e404be 100644
--- a/dockerfiles/run/spring/destination/conf/mailetcontainer.xml
+++ b/dockerfiles/run/spring/destination/conf/mailetcontainer.xml
@@ -49,6 +49,12 @@
</processor>
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -74,16 +80,7 @@
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="ToProcessor">
+ <mailet match="relay-allowed" class="ToProcessor">
<processor>relay</processor>
</mailet>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/cli-integration/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/cli-integration/src/test/resources/mailetcontainer.xml b/server/container/cli-integration/src/test/resources/mailetcontainer.xml
index a842eee..fce9722 100644
--- a/server/container/cli-integration/src/test/resources/mailetcontainer.xml
+++ b/server/container/cli-integration/src/test/resources/mailetcontainer.xml
@@ -46,6 +46,13 @@
<processor state="transport" enableJmx="false">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -60,16 +67,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="org.apache.james.jmap.mailet.SentByJmap" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/cassandra-guice/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/resources/mailetcontainer.xml b/server/container/guice/cassandra-guice/src/test/resources/mailetcontainer.xml
index 77dd9ec..7605951 100644
--- a/server/container/guice/cassandra-guice/src/test/resources/mailetcontainer.xml
+++ b/server/container/guice/cassandra-guice/src/test/resources/mailetcontainer.xml
@@ -47,6 +47,12 @@
<processor state="transport" enableJmx="false">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
<mailet match="SenderIs=denied@other.com" class="ToProcessor">
<processor>sender-denied</processor>
</mailet>
@@ -73,7 +79,7 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="RemoteDelivery">
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/cassandra-ldap-guice/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-ldap-guice/src/test/resources/mailetcontainer.xml b/server/container/guice/cassandra-ldap-guice/src/test/resources/mailetcontainer.xml
index b265f93..2c8ea18 100644
--- a/server/container/guice/cassandra-ldap-guice/src/test/resources/mailetcontainer.xml
+++ b/server/container/guice/cassandra-ldap-guice/src/test/resources/mailetcontainer.xml
@@ -47,6 +47,12 @@
<processor state="transport" enableJmx="false">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -61,7 +67,7 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="RemoteDelivery">
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/jpa-guice/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-guice/src/test/resources/mailetcontainer.xml b/server/container/guice/jpa-guice/src/test/resources/mailetcontainer.xml
index 8bc27f8..cdf3ef8 100644
--- a/server/container/guice/jpa-guice/src/test/resources/mailetcontainer.xml
+++ b/server/container/guice/jpa-guice/src/test/resources/mailetcontainer.xml
@@ -47,6 +47,11 @@
<processor state="transport" enableJmx="false">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SentByMailet"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -62,13 +67,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/jpa-smtp-mariadb/sample-configuration/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-smtp-mariadb/sample-configuration/mailetcontainer.xml b/server/container/guice/jpa-smtp-mariadb/sample-configuration/mailetcontainer.xml
index 909c5db..8ad6c2c 100644
--- a/server/container/guice/jpa-smtp-mariadb/sample-configuration/mailetcontainer.xml
+++ b/server/container/guice/jpa-smtp-mariadb/sample-configuration/mailetcontainer.xml
@@ -72,6 +72,12 @@
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -86,13 +92,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/jpa-smtp/sample-configuration/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-smtp/sample-configuration/mailetcontainer.xml b/server/container/guice/jpa-smtp/sample-configuration/mailetcontainer.xml
index 909c5db..8ad6c2c 100644
--- a/server/container/guice/jpa-smtp/sample-configuration/mailetcontainer.xml
+++ b/server/container/guice/jpa-smtp/sample-configuration/mailetcontainer.xml
@@ -72,6 +72,12 @@
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -86,13 +92,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml b/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
index 40509a8..efeca5d 100644
--- a/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
+++ b/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
@@ -46,13 +46,17 @@
</processor>
<processor state="transport" enableJmx="true">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
</mailet>
- <mailet match="org.apache.james.jmap.mailet.SentByJmap" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
<mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="SetMimeHeader">
<name>X-WasSigned</name>
<value>true</value>
@@ -65,13 +69,7 @@
<mailet match="RecipientIsLocal" class="Sieve"/>
<mailet match="RecipientIsLocal" class="LocalDelivery"/>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/mailetcontainer.xml b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/mailetcontainer.xml
index 914b1a7..aae7b8b 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/mailetcontainer.xml
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/mailetcontainer.xml
@@ -47,6 +47,12 @@
<matcher match="HasMimeType=multipart/report"/>
<matcher match="HasMimeTypeParameter=report-type=disposition-notification"/>
</matcher>
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
@@ -75,19 +81,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="org.apache.james.jmap.mailet.SentByJmap" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
@@ -96,6 +91,7 @@
<sendpartial>true</sendpartial>
<bounceProcessor>bounces</bounceProcessor>
</mailet>
+
<mailet match="All" class="ToProcessor">
<processor>relay-denied</processor>
</mailet>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/resources/mailetcontainer.xml b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/resources/mailetcontainer.xml
index 660f310..e1f7f43 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/resources/mailetcontainer.xml
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/resources/mailetcontainer.xml
@@ -48,6 +48,12 @@
<matcher match="HasMimeType=multipart/report"/>
<matcher match="HasMimeTypeParameter=report-type=disposition-notification"/>
</matcher>
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
@@ -76,16 +82,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SMTPIsAuthNetwork" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
@@ -94,6 +92,7 @@
<sendpartial>true</sendpartial>
<bounceProcessor>bounces</bounceProcessor>
</mailet>
+
<mailet match="All" class="ToProcessor">
<processor>relay-denied</processor>
</mailet>
http://git-wip-us.apache.org/repos/asf/james-project/blob/aaf12995/server/protocols/webadmin-integration-test/src/test/resources/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin-integration-test/src/test/resources/mailetcontainer.xml b/server/protocols/webadmin-integration-test/src/test/resources/mailetcontainer.xml
index cf90f14..15f351d 100644
--- a/server/protocols/webadmin-integration-test/src/test/resources/mailetcontainer.xml
+++ b/server/protocols/webadmin-integration-test/src/test/resources/mailetcontainer.xml
@@ -47,6 +47,13 @@
<processor state="transport" enableJmx="false">
+ <matcher name="relay-allowed" match="org.apache.james.mailetcontainer.impl.matchers.Or">
+ <matcher match="SMTPAuthSuccessful"/>
+ <matcher match="SMTPIsAuthNetwork"/>
+ <matcher match="SentByMailet"/>
+ <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+ </matcher>
+
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
@@ -62,13 +69,8 @@
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
- <mailet match="SMTPAuthSuccessful" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="SentByMailet" class="SetMailAttribute">
- <RelayAllowed>true</RelayAllowed>
- </mailet>
- <mailet match="HasMailAttribute=RelayAllowed" class="RemoteDelivery">
+
+ <mailet match="relay-allowed" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
<maxRetries>25</maxRetries>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org