This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push: new 4e2bb0b57b [FIX] Avoid sending bounce when reprocessing (#2139) 4e2bb0b57b is described below commit 4e2bb0b57bd949709a92978ba312bdfb87a04727 Author: Benoit TELLIER <btell...@linagora.com> AuthorDate: Fri Mar 22 14:55:42 2024 +0100 [FIX] Avoid sending bounce when reprocessing (#2139) --- server/apps/cassandra-app/sample-configuration/mailetcontainer.xml | 5 ++++- .../apps/distributed-app/sample-configuration/mailetcontainer.xml | 5 ++++- server/apps/distributed-app/src/test/resources/mailetcontainer.xml | 5 ++++- .../distributed-pop3-app/sample-configuration/mailetcontainer.xml | 5 ++++- .../distributed-pop3-app/src/test/resources/mailetcontainer.xml | 5 ++++- server/apps/jpa-app/sample-configuration/mailetcontainer.xml | 5 ++++- server/apps/jpa-app/src/test/resources/mailetcontainer.xml | 5 ++++- server/apps/jpa-smtp-app/sample-configuration/mailetcontainer.xml | 5 ++++- server/apps/jpa-smtp-app/src/test/resources/mailetcontainer.xml | 5 ++++- server/apps/memory-app/sample-configuration/mailetcontainer.xml | 5 ++++- server/apps/memory-app/src/test/resources/mailetcontainer.xml | 5 ++++- .../scaling-pulsar-smtp/sample-configuration/mailetcontainer.xml | 5 ++++- .../apps/scaling-pulsar-smtp/src/test/resources/mailetcontainer.xml | 5 ++++- server/apps/spring-app/src/main/resources/mailetcontainer.xml | 6 +++++- 14 files changed, 57 insertions(+), 14 deletions(-) diff --git a/server/apps/cassandra-app/sample-configuration/mailetcontainer.xml b/server/apps/cassandra-app/sample-configuration/mailetcontainer.xml index f9c62031f0..bcd4a99f11 100644 --- a/server/apps/cassandra-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/cassandra-app/sample-configuration/mailetcontainer.xml @@ -46,10 +46,13 @@ </processor> <processor state="error" enableJmx="true"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> <mailet match="All" class="MetricsMailet"> <metricName>mailetContainerErrors</metricName> </mailet> - <mailet match="All" class="Bounce"> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/distributed-app/sample-configuration/mailetcontainer.xml b/server/apps/distributed-app/sample-configuration/mailetcontainer.xml index f9c62031f0..7885ff1796 100644 --- a/server/apps/distributed-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/distributed-app/sample-configuration/mailetcontainer.xml @@ -46,10 +46,13 @@ </processor> <processor state="error" enableJmx="true"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> <mailet match="All" class="MetricsMailet"> <metricName>mailetContainerErrors</metricName> </mailet> - <mailet match="All" class="Bounce"> + <mailet match="not-reprocessed" class="MetricsMailet"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/distributed-app/src/test/resources/mailetcontainer.xml b/server/apps/distributed-app/src/test/resources/mailetcontainer.xml index 62a33ce870..119f0f89c1 100644 --- a/server/apps/distributed-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/distributed-app/src/test/resources/mailetcontainer.xml @@ -40,7 +40,10 @@ </processor> <processor state="error" enableJmx="false"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/distributed-pop3-app/sample-configuration/mailetcontainer.xml b/server/apps/distributed-pop3-app/sample-configuration/mailetcontainer.xml index 945deba91f..19a839cdc1 100644 --- a/server/apps/distributed-pop3-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/distributed-pop3-app/sample-configuration/mailetcontainer.xml @@ -46,10 +46,13 @@ </processor> <processor state="error" enableJmx="true"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> <mailet match="All" class="MetricsMailet"> <metricName>mailetContainerErrors</metricName> </mailet> - <mailet match="All" class="Bounce"> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/distributed-pop3-app/src/test/resources/mailetcontainer.xml b/server/apps/distributed-pop3-app/src/test/resources/mailetcontainer.xml index 16cf49b911..cb0a08af66 100644 --- a/server/apps/distributed-pop3-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/distributed-pop3-app/src/test/resources/mailetcontainer.xml @@ -40,7 +40,10 @@ </processor> <processor state="error" enableJmx="false"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/jpa-app/sample-configuration/mailetcontainer.xml b/server/apps/jpa-app/sample-configuration/mailetcontainer.xml index 90cbcedef1..55e84ba625 100644 --- a/server/apps/jpa-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/jpa-app/sample-configuration/mailetcontainer.xml @@ -46,10 +46,13 @@ </processor> <processor state="error" enableJmx="true"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> <mailet match="All" class="MetricsMailet"> <metricName>mailetContainerErrors</metricName> </mailet> - <mailet match="All" class="Bounce"> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/jpa-app/src/test/resources/mailetcontainer.xml b/server/apps/jpa-app/src/test/resources/mailetcontainer.xml index b8b531ddfb..d8bc8c5017 100644 --- a/server/apps/jpa-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/jpa-app/src/test/resources/mailetcontainer.xml @@ -40,7 +40,10 @@ </processor> <processor state="error" enableJmx="false"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/jpa-smtp-app/sample-configuration/mailetcontainer.xml b/server/apps/jpa-smtp-app/sample-configuration/mailetcontainer.xml index 4360a22d81..0fa87f2c4a 100644 --- a/server/apps/jpa-smtp-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/jpa-smtp-app/sample-configuration/mailetcontainer.xml @@ -46,7 +46,10 @@ </processor> <processor state="error" enableJmx="true"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/jpa-smtp-app/src/test/resources/mailetcontainer.xml b/server/apps/jpa-smtp-app/src/test/resources/mailetcontainer.xml index f1f0ef3dd7..23733124cb 100644 --- a/server/apps/jpa-smtp-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/jpa-smtp-app/src/test/resources/mailetcontainer.xml @@ -44,7 +44,10 @@ </processor> <processor state="error" enableJmx="true"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/memory-app/sample-configuration/mailetcontainer.xml b/server/apps/memory-app/sample-configuration/mailetcontainer.xml index a05cf3ca74..b1e998cf03 100644 --- a/server/apps/memory-app/sample-configuration/mailetcontainer.xml +++ b/server/apps/memory-app/sample-configuration/mailetcontainer.xml @@ -46,10 +46,13 @@ </processor> <processor state="error" enableJmx="true"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> <mailet match="All" class="MetricsMailet"> <metricName>mailetContainerErrors</metricName> </mailet> - <mailet match="All" class="Bounce"> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/memory-app/src/test/resources/mailetcontainer.xml b/server/apps/memory-app/src/test/resources/mailetcontainer.xml index 71c532db77..7784d05997 100644 --- a/server/apps/memory-app/src/test/resources/mailetcontainer.xml +++ b/server/apps/memory-app/src/test/resources/mailetcontainer.xml @@ -40,7 +40,10 @@ </processor> <processor state="error" enableJmx="false"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> <onMailetException>ignore</onMailetException> </mailet> <mailet match="All" class="ToRepository"> diff --git a/server/apps/scaling-pulsar-smtp/sample-configuration/mailetcontainer.xml b/server/apps/scaling-pulsar-smtp/sample-configuration/mailetcontainer.xml index f95729d6b7..b5e1b674b1 100644 --- a/server/apps/scaling-pulsar-smtp/sample-configuration/mailetcontainer.xml +++ b/server/apps/scaling-pulsar-smtp/sample-configuration/mailetcontainer.xml @@ -42,7 +42,10 @@ </processor> <processor state="error" enableJmx="true"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> </mailet> <mailet match="All" class="ToRepository"> <repositoryPath>blob://var/mail/error/</repositoryPath> diff --git a/server/apps/scaling-pulsar-smtp/src/test/resources/mailetcontainer.xml b/server/apps/scaling-pulsar-smtp/src/test/resources/mailetcontainer.xml index 725c113d2a..c2a7e73f5e 100644 --- a/server/apps/scaling-pulsar-smtp/src/test/resources/mailetcontainer.xml +++ b/server/apps/scaling-pulsar-smtp/src/test/resources/mailetcontainer.xml @@ -40,7 +40,10 @@ </processor> <processor state="error" enableJmx="true"> - <mailet match="All" class="Bounce"> + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"> </mailet> <mailet match="All" class="ToRepository"> <repositoryPath>blob://var/mail/error/</repositoryPath> diff --git a/server/apps/spring-app/src/main/resources/mailetcontainer.xml b/server/apps/spring-app/src/main/resources/mailetcontainer.xml index 927b035857..53e614cdf8 100644 --- a/server/apps/spring-app/src/main/resources/mailetcontainer.xml +++ b/server/apps/spring-app/src/main/resources/mailetcontainer.xml @@ -199,7 +199,11 @@ Regards, Postmaster XXX.YYY <processor state="error" enableJmx="true"> <!-- If you want to notify the sender their message generated an error, uncomment this --> <!-- - <mailet match="All" class="Bounce"/> + + <matcher name="not-reprocessed" match="org.apache.james.mailetcontainer.impl.matchers.Not"> + <matcher match="HasMailAttribute=mailRepository-reprocessing"/> + </matcher> + <mailet match="not-reprocessed" class="Bounce"/> --> <!-- If you want to notify the postmaster that a message generated an error, uncomment this --> <!-- --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org