Re: [PR] JAMES-2586 Integration tests for JMAP postgres [james-project]

2024-02-27 Thread via GitHub


hungphan227 commented on code in PR #2029:
URL: https://github.com/apache/james-project/pull/2029#discussion_r1505490515


##
backends-common/postgres/src/test/java/org/apache/james/backends/postgres/PostgresExtension.java:
##
@@ -178,6 +178,10 @@ public void beforeEach(ExtensionContext extensionContext) {
 @Override
 public void afterEach(ExtensionContext extensionContext) {
 resetSchema();
+
+if (!rlsEnabled) {
+dropAllConnections();
+}

Review Comment:
   what disposePostgresSession close is connection of PostgresExtension, not 
connections created when running PostgresJamesServerMain



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: JAMES-4012 Lenient MDN parsing for human readable part (#2057)

2024-02-27 Thread btellier
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 a63d257f2c JAMES-4012 Lenient MDN parsing for human readable part 
(#2057)
a63d257f2c is described below

commit a63d257f2c87fb20ed30bbdc55ce1e49564eecc0
Author: Benoit TELLIER 
AuthorDate: Wed Feb 28 08:39:25 2024 +0100

JAMES-4012 Lenient MDN parsing for human readable part (#2057)
---
 mdn/src/main/java/org/apache/james/mdn/MDN.java| 65 +---
 .../test/java/org/apache/james/mdn/MDNTest.java| 88 --
 2 files changed, 117 insertions(+), 36 deletions(-)

diff --git a/mdn/src/main/java/org/apache/james/mdn/MDN.java 
b/mdn/src/main/java/org/apache/james/mdn/MDN.java
index 737ec1cb25..a884239628 100644
--- a/mdn/src/main/java/org/apache/james/mdn/MDN.java
+++ b/mdn/src/main/java/org/apache/james/mdn/MDN.java
@@ -87,7 +87,6 @@ public class MDN {
 public MDN build() {
 Preconditions.checkState(report != null);
 Preconditions.checkState(humanReadableText != null);
-Preconditions.checkState(!humanReadableText.trim().isEmpty());
 
 return new MDN(humanReadableText, report, message);
 }
@@ -130,15 +129,17 @@ public class MDN {
 throw new MDNParseBodyPartInvalidException("MDN Message must 
contain at least two parts");
 }
 try {
-var humanReadableTextEntity = bodyParts.get(0);
-return extractHumanReadableText(humanReadableTextEntity)
-.flatMap(humanReadableText -> 
extractMDNReport(bodyParts.get(1))
-.map(report -> MDN.builder()
+return extractMDNReport(bodyParts)
+.map(Throwing.function(report -> {
+String humanReadableText = 
extractHumanReadableText(bodyParts)
+.orElse("");
+return MDN.builder()
 .humanReadableText(humanReadableText)
 .report(report)
 .message(extractOriginalMessage(bodyParts))
-.build()))
-.orElseThrow(() -> new MDNParseException("MDN can not extract. 
Body part is invalid"));
+.build();
+}))
+.orElseThrow(() -> new MDNParseException("MDN can not extract. 
Report body part is invalid"));
 } catch (MDNParseException e) {
 throw e;
 } catch (Exception e) {
@@ -156,29 +157,37 @@ public class MDN {
 .map(Message.class::cast);
 }
 
-public static Optional extractHumanReadableText(Entity 
humanReadableTextEntity) throws IOException {
-if (humanReadableTextEntity.getMimeType().equals("text/plain")) {
-try (InputStream inputStream = ((SingleBody) 
humanReadableTextEntity.getBody()).getInputStream()) {
-return Optional.of(IOUtils.toString(inputStream, 
humanReadableTextEntity.getCharset()));
-}
-}
-return Optional.empty();
+public static Optional extractHumanReadableText(List 
entities) throws IOException {
+return entities.stream()
+.filter(entity -> entity.getMimeType().equals("text/plain"))
+.findAny()
+.map(Throwing.function(entity -> {
+try (InputStream inputStream = ((SingleBody) 
entity.getBody()).getInputStream()) {
+return IOUtils.toString(inputStream, entity.getCharset());
+}
+}).sneakyThrow());
 }
 
-public static Optional extractMDNReport(Entity reportEntity) {
-if (!reportEntity.getMimeType().startsWith(DISPOSITION_CONTENT_TYPE)) {
-return Optional.empty();
-}
-try (InputStream inputStream = ((SingleBody) 
reportEntity.getBody()).getInputStream()) {
-Try result = MDNReportParser.parse(inputStream, 
reportEntity.getCharset());
-if (result.isSuccess()) {
-return Optional.of(result.get());
-} else {
-return Optional.empty();
-}
-} catch (IOException e) {
-return Optional.empty();
-}
+public static Optional extractMDNReport(List entities) {
+return entities.stream()
+.filter(entity -> 
entity.getMimeType().startsWith(DISPOSITION_CONTENT_TYPE))
+.findAny()
+.flatMap(entity -> {
+try (InputStream inputStream = ((SingleBody) 
entity.getBody()).getInputStream()) {
+Try result = MDNReportParser.parse(inputStream, 
entity.getCharset());
+if (result.isSuccess()) {
+return Optional.of(result.get());
+} else {
+return Optional.empty();
+}
+   

Re: [PR] JAMES-4012 Lenient MDN parsing for human readable part [james-project]

2024-02-27 Thread via GitHub


chibenwa merged PR #2057:
URL: https://github.com/apache/james-project/pull/2057


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-site) branch asf-staging updated: Site checkin for project Apache James: Jenkins Tools

2024-02-27 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/james-site.git


The following commit(s) were added to refs/heads/asf-staging by this push:
 new b793df1ba Site checkin for project Apache James: Jenkins Tools
b793df1ba is described below

commit b793df1ba9533bdf0317e17fe5a45ac47f240335
Author: jenkins 
AuthorDate: Wed Feb 28 07:39:01 2024 +

Site checkin for project Apache James: Jenkins Tools
---
 _/css/site.css |   2 +-
 _/js/site.js   |   4 +-
 _/js/vendor/highlight.js   |   2 +-
 .../3.8.0/configure/blobstore.html |  11 -
 james-distributed-app/3.8.0/configure/jmap.html|   4 -
 james-distributed-app/3.8.0/configure/mailets.html |   4 +-
 james-distributed-app/3.8.1/operate/webadmin.html  |   2 +-
 sitemap-james-distributed-app.xml  | 140 +-
 sitemap-james-project.xml  | 286 ++---
 sitemap-james-site.xml |   4 +-
 10 files changed, 222 insertions(+), 237 deletions(-)

diff --git a/_/css/site.css b/_/css/site.css
index e7b43c532..b0dac5342 100644
--- a/_/css/site.css
+++ b/_/css/site.css
@@ -1,3 +1,3 @@
-@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../font/roboto-latin-400-normal.woff2)
 format("woff2"),url(../font/roboto-latin-400-normal.woff) 
format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../font/roboto-cyrillic-400-normal.woff2)
 format("woff2");unicode-range:U+0301,U+0400-04 [...]
+@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../font/roboto-latin-400-normal.woff2)
 format("woff2"),url(../font/roboto-latin-400-normal.woff) 
format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(../font/roboto-cyrillic-400-normal.woff2)
 format("woff2");unicode-range:U+0301,U+0400-04 [...]
 
 /*! Adapted from the GitHub style by Vasily Polovnyov  
*/.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:600}.hljs-literal,.hljs-number,.hljs-tag
 
.hljs-attr,.hljs-template-variable,.hljs-variable{color:teal}.hljs-doctag,.hljs-string{color:#d14}.hljs-section,.hljs-selector-id,.hljs-title{color:#900;font-weight:600}.hljs-subst{font-weight:400}.hljs-class
 .hljs-title,.hljs-type{color:#458;font-wei [...]
\ No newline at end of file
diff --git a/_/js/site.js b/_/js/site.js
index f02ada96e..e72dab7da 100644
--- a/_/js/site.js
+++ b/_/js/site.js
@@ -1,5 +1,5 @@
-!function(){"use strict";var 
i,c,e,o,t,s,r,l=/^sect(\d)$/,a=document.querySelector(".nav-container");function
 n(){var 
e,t,n=window.location.hash;if(n&&(n.indexOf("%")&&(n=decodeURIComponent(n)),!(e=o.querySelector('.nav-link[href="'+n+'"]'{n=document.getElementById(n.slice(1));if(n)for(var
 i=n,a=document.querySelector("article.doc");(i=i.parentNode)&!==a;){var 
c=i.id;if((c=c||(c=l.test(i.className))&&(i.firstElementChild||{}).id)&&(e=o.querySelector('.nav-link[href="#'+c+'"]')))bre
 [...]
-!function(){"use strict";var 
e=document.querySelector("aside.toc.sidebar");if(e){if(document.querySelector("body.-toc"))return
 e.parentNode.removeChild(e);var 
t=parseInt(e.dataset.levels||2,10);if(!(t<0)){var 
o="article.doc",d=document.querySelector(o);if(d){for(var 
n=[],i=0;i<=t;i++){var r=[o];if(i){for(var 
c=1;c<=i;c++)r.push((2===c?".sectionbody>":"")+".sect"+c);r.push("h"+(i+1)+"[id]"+(1"))}m=n.join(","),f=d.parent [...]
+!function(){"use strict";var 
e,o,s,r=/^sect(\d)$/,i=document.querySelector(".nav-container"),a=document.querySelector(".nav-toggle"),c=i.querySelector(".nav"),t=i.querySelector(".nav-menu-toggle"),l=(a.addEventListener("click",function(e){if(a.classList.contains("is-active"))return
 v(e);m(e);var 
e=document.documentElement,t=(e.classList.add("is-clipped--nav"),a.classList.add("is-active"),i.classList.add("is-active"),c.getBoundingClientRect()),n=window.innerHeight-Math.round(t.top);Math.r
 [...]
+!function(){"use strict";var 
e=document.querySelector("aside.toc.sidebar");if(e){if(document.querySelector("body.-toc"))return
 e.parentNode.removeChild(e);var 
t=parseInt(e.dataset.levels||2,10);if(!(t<0)){var 
o="article.doc",d=document.querySelector(o);if(d){for(var 
n=[],i=0;i<=t;i++){var r=[o];if(i){for(var 
a=1;a<=i;a++)r.push((2===a?".sectionbody>":"")+".sect"+a);r.push("h"+(i+1)+"[id]")}else
 r.push("h1[id].sect0");n.push(r.join(">"))}m=n.join(","),f=d.parentNode;var 
c,s=[].slice.call( [...]
 !function(){"use strict";var 

Re: [PR] JAMES-2586 Integration tests for JMAP postgres [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on PR #2029:
URL: https://github.com/apache/james-project/pull/2029#issuecomment-1968365306

   @hungphan227 related? 
https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-2029/15/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-4003 [FIX] Avoid forwarding bounces as it might create infinite loops [james-project]

2024-02-27 Thread via GitHub


chibenwa commented on code in PR #2022:
URL: https://github.com/apache/james-project/pull/2022#discussion_r1505428445


##
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java:
##
@@ -182,7 +186,8 @@ public RecipientRewriteTableProcessor(RecipientRewriteTable 
virtualTableStore, D
 }
 
 public RecipientRewriteTableProcessor(RecipientRewriteTable 
virtualTableStore, DomainList domainList, MailetContext mailetContext) {
-this(virtualTableStore, domainList, mailetContext, new 
ProcessingState(Mail.ERROR), !REWRITE_SENDER_UPON_FORWARD);
+this(virtualTableStore, domainList, mailetContext, new 
ProcessingState(Mail.ERROR), !REWRITE_SENDER_UPON_FORWARD,
+false);

Review Comment:
   Ok with the comment.
   
   Please push your fixup ;-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] WIP Enforce a separate keyspace for blob store cache [james-project]

2024-02-27 Thread via GitHub


chibenwa commented on code in PR #2060:
URL: https://github.com/apache/james-project/pull/2060#discussion_r1505427901


##
server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraCacheSessionModule.java:
##
@@ -72,12 +71,8 @@ static class InitializedCacheCluster {
 private final CqlSession cluster;
 
 @Inject
-private InitializedCacheCluster(CqlSession cluster, 
ClusterConfiguration clusterConfiguration, KeyspacesConfiguration 
keyspacesConfiguration) {
-this.cluster = cluster;
-
-if (clusterConfiguration.shouldCreateKeyspace()) {
-
KeyspaceFactory.createKeyspace(keyspacesConfiguration.cacheKeyspaceConfiguration(),
 cluster).block();
-}
+private InitializedCacheCluster(ResilientClusterProvider 
sessionProvider, KeyspacesConfiguration keyspacesConfiguration) {
+this.cluster = 
sessionProvider.get(keyspacesConfiguration.cacheKeyspaceConfiguration());

Review Comment:
   Session provider creates it implicitly?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES 3996 Redis event bus POC [james-project]

2024-02-27 Thread via GitHub


Maxxx873 commented on PR #2028:
URL: https://github.com/apache/james-project/pull/2028#issuecomment-1968287999

   > > Hello! If I understand correctly, then after completing this task, the 
task that I previously started https://issues.apache.org/jira/browse/JAMES-3956 
will be closed. You do it much faster)
   > 
   > Hi, in this POC I focused on the key part using Redis Pub/Sub but not the 
group part (our focus is to test the stability of Redis event bus key part 
first). So likely I would not move on the group part soon.
   > 
   > You are welcome to take this work and continue on the group part ^^.
   
   Thanks for your reply! I'll keep an eye on developments


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES 3996 Redis event bus POC [james-project]

2024-02-27 Thread via GitHub


quantranhong1999 commented on PR #2028:
URL: https://github.com/apache/james-project/pull/2028#issuecomment-1968250395

   > Hello! If I understand correctly, then after completing this task, the 
task that I previously started https://issues.apache.org/jira/browse/JAMES-3956 
will be closed. You do it much faster)
   
   Hi, in this POC I focused on the key part using Redis Pub/Sub but not the 
group part (our focus is to test the stability of Redis event bus key part 
first). So likely I would not move on the group part soon.
   
   You are welcome to take this work and continue on the group part ^^.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES 3996 Redis event bus POC [james-project]

2024-02-27 Thread via GitHub


Maxxx873 commented on PR #2028:
URL: https://github.com/apache/james-project/pull/2028#issuecomment-1968243951

   Hello! If I understand correctly, then after completing this task, the task 
that I previously started https://issues.apache.org/jira/browse/JAMES-3956 will 
be closed. You do it much faster)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-2586 Integration tests for JMAP postgres [james-project]

2024-02-27 Thread via GitHub


quantranhong1999 commented on code in PR #2029:
URL: https://github.com/apache/james-project/pull/2029#discussion_r1505331219


##
backends-common/postgres/src/test/java/org/apache/james/backends/postgres/PostgresExtension.java:
##
@@ -178,6 +178,10 @@ public void beforeEach(ExtensionContext extensionContext) {
 @Override
 public void afterEach(ExtensionContext extensionContext) {
 resetSchema();
+
+if (!rlsEnabled) {
+dropAllConnections();
+}

Review Comment:
   Another way without introducing more code: move `disposePostgresSession` 
from `afterAll` to `afterEach`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [FIX] Remove a benign log in DeletedMessageVaultDeletionCallback [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2059:
URL: https://github.com/apache/james-project/pull/2059


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) 01/02: [FIX] Drop unused code in DeletedMessageVaultDeletionCallback

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f7a898ad36e1f7ce41d98cb2f67da1fcc4cc2b56
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 11:41:27 2024 +0100

[FIX] Drop unused code in DeletedMessageVaultDeletionCallback
---
 .../vault/metadata/DeletedMessageVaultDeletionCallback.java  | 9 -
 1 file changed, 9 deletions(-)

diff --git 
a/mailbox/plugin/deleted-messages-vault-cassandra/src/main/java/org/apache/james/vault/metadata/DeletedMessageVaultDeletionCallback.java
 
b/mailbox/plugin/deleted-messages-vault-cassandra/src/main/java/org/apache/james/vault/metadata/DeletedMessageVaultDeletionCallback.java
index 57746c6be7..b23a895f20 100644
--- 
a/mailbox/plugin/deleted-messages-vault-cassandra/src/main/java/org/apache/james/vault/metadata/DeletedMessageVaultDeletionCallback.java
+++ 
b/mailbox/plugin/deleted-messages-vault-cassandra/src/main/java/org/apache/james/vault/metadata/DeletedMessageVaultDeletionCallback.java
@@ -26,7 +26,6 @@ import java.io.SequenceInputStream;
 import java.time.Clock;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
-import java.util.Date;
 import java.util.Optional;
 import java.util.Set;
 
@@ -109,14 +108,6 @@ public class DeletedMessageVaultDeletionCallback 
implements DeleteMessageListene
 }
 }
 
-
-private ZonedDateTime retrieveDeliveryDate(Optional mimeMessage, 
org.apache.james.mailbox.store.mail.model.Message message) {
-return mimeMessage.map(Message::getDate)
-.map(Date::toInstant)
-.map(instant -> ZonedDateTime.ofInstant(instant, ZoneOffset.UTC))
-
.orElse(ZonedDateTime.ofInstant(message.getInternalDate().toInstant(), 
ZoneOffset.UTC));
-}
-
 private MaybeSender retrieveSender(Optional mimeMessage) {
 return mimeMessage
 .map(Message::getSender)


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [FIX] java.util.NoSuchElementException: requestDecoder [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2061:
URL: https://github.com/apache/james-project/pull/2061


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated (80b88e42ee -> df87f0b4b1)

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


from 80b88e42ee [FIX] Lower log message in MaybeSender
 add df87f0b4b1 [FIX] java.util.NoSuchElementException: requestDecoder

No new revisions were added by this update.

Summary of changes:
 .../org/apache/james/imapserver/netty/ImapRequestFrameDecoder.java  | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated (e48f8fcde7 -> 80b88e42ee)

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


from e48f8fcde7 [BUILD] RemoteDeliveryErrorHandlingTest was unstable
 new f7a898ad36 [FIX] Drop unused code in 
DeletedMessageVaultDeletionCallback
 new 80b88e42ee [FIX] Lower log message in MaybeSender

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 core/src/main/java/org/apache/james/core/MaybeSender.java| 2 +-
 .../vault/metadata/DeletedMessageVaultDeletionCallback.java  | 9 -
 2 files changed, 1 insertion(+), 10 deletions(-)


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) 02/02: [FIX] Lower log message in MaybeSender

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 80b88e42ee6ebc3460f3a85c1be3376ffa22
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 11:41:54 2024 +0100

[FIX] Lower log message in MaybeSender

This is benign, not an issue.
---
 core/src/main/java/org/apache/james/core/MaybeSender.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/james/core/MaybeSender.java 
b/core/src/main/java/org/apache/james/core/MaybeSender.java
index 3038ee0a7e..0d00fd043c 100644
--- a/core/src/main/java/org/apache/james/core/MaybeSender.java
+++ b/core/src/main/java/org/apache/james/core/MaybeSender.java
@@ -47,7 +47,7 @@ public class MaybeSender {
 return MaybeSender.of(new MailAddress(sender));
 } catch (AddressException e) {
 // Should never happen as long as the user does not modify the 
header by himself
-LOGGER.warn("Unable to parse the sender address {}, so we fallback 
to a null sender", sender, e);
+LOGGER.info("Unable to parse the sender address {}, so we fallback 
to a null sender: {}", sender, e.getMessage());
 return MaybeSender.nullSender();
 }
 }


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Revert git commit id maven plugin [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on PR #2049:
URL: https://github.com/apache/james-project/pull/2049#issuecomment-1968165547

   Thanks @jeantil for the suggestion, I think that might do it actually and 
it's rather clean. I'm in favor, thanks for making the PR too @chibenwa 
   
   Closing this as a result.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Revert git commit id maven plugin [james-project]

2024-02-27 Thread via GitHub


Arsnael closed pull request #2049: Revert git commit id maven plugin
URL: https://github.com/apache/james-project/pull/2049


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: [BUILD] RemoteDeliveryErrorHandlingTest was unstable

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier 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 e48f8fcde7 [BUILD] RemoteDeliveryErrorHandlingTest was unstable
e48f8fcde7 is described below

commit e48f8fcde71cd0931cb2a45f30058a70348f45e7
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 22:31:29 2024 +0100

[BUILD] RemoteDeliveryErrorHandlingTest was unstable

As we did not await task execution the seond mail repository
reprocessing could be triggered while the first one was not
even started which would go undetected.

Strictier awaits does the trick
---
 .../mailets/RemoteDeliveryErrorHandlingTest.java   | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git 
a/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
 
b/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
index 96aab51829..10ef0704a6 100644
--- 
a/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
+++ 
b/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
@@ -249,22 +249,36 @@ class RemoteDeliveryErrorHandlingTest {
 .isEqualTo(1));
 
 // When we retry and temporary problem is not solved
-given()
+Object taskId = given()
 .spec(webAdminApi)
 .param("action", "reprocess")
 .param("queue", MailQueueFactory.SPOOL.asString())
 .param("processor", TRANSPORT_PROCESSOR)
-.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails");
+.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails")
+.body()
+.jsonPath()
+.get("taskId");
+
+given()
+.spec(webAdminApi)
+.get("/tests/" + taskId + "/await");
+
 awaitAtMostOneMinute
 .untilAsserted(() -> 
assertThat(jamesServer.getProbe(MailRepositoryProbeImpl.class)
 
.getRepositoryMailCount(REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY))
 .isEqualTo(1));
-given()
+Object taskId2 = given()
 .spec(webAdminApi)
 .param("action", "reprocess")
 .param("queue", MailQueueFactory.SPOOL.asString())
 .param("processor", TRANSPORT_PROCESSOR)
-.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails");
+.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails")
+.body()
+.jsonPath()
+.get("taskId");
+given()
+.spec(webAdminApi)
+.get("/tests/" + taskId2 + "/await");
 
 // Then mail should be stored in permanent error repository
 awaitAtMostOneMinute


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [BUILD] RemoteDeliveryErrorHandlingTest was unstable [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2064:
URL: https://github.com/apache/james-project/pull/2064


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: JAMES-4013 Relay MDN/send

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier 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 326b892ac1 JAMES-4013 Relay MDN/send
326b892ac1 is described below

commit 326b892ac1f51556084386195f9c47f6405557ef
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 14:23:37 2024 +0100

JAMES-4013 Relay MDN/send
---
 .../scala/org/apache/james/jmap/method/MDNSendMethod.scala   | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MDNSendMethod.scala
 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MDNSendMethod.scala
index 40a8b71f3e..25adba64e9 100644
--- 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MDNSendMethod.scala
+++ 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MDNSendMethod.scala
@@ -31,7 +31,7 @@ import org.apache.james.jmap.json.MDNSerializer
 import org.apache.james.jmap.mail.MDN._
 import org.apache.james.jmap.mail.MDNSend.MDN_ALREADY_SENT_FLAG
 import org.apache.james.jmap.mail._
-import org.apache.james.jmap.method.EmailSubmissionSetMethod.LOGGER
+import org.apache.james.jmap.method.EmailSubmissionSetMethod.{LOGGER, 
MAIL_METADATA_USERNAME_ATTRIBUTE}
 import org.apache.james.jmap.routes.{ProcessingContext, SessionSupplier}
 import org.apache.james.lifecycle.api.{LifecycleUtil, Startable}
 import org.apache.james.mailbox.model.{FetchGroup, MessageResult}
@@ -48,6 +48,7 @@ import org.apache.james.queue.api.MailQueueFactory.SPOOL
 import org.apache.james.queue.api.{MailQueue, MailQueueFactory}
 import org.apache.james.server.core.MailImpl
 import org.apache.james.util.ReactorUtils
+import org.apache.mailet.{Attribute, AttributeValue}
 import play.api.libs.json.{JsError, JsObject, JsSuccess}
 import reactor.core.scala.publisher.{SFlux, SMono}
 
@@ -148,7 +149,7 @@ class MDNSendMethod @Inject()(serializer: MDNSerializer,
   mdnRelatedMessageResult <- retrieveRelatedMessageResult(session, 
requestEntry)
   mdnRelatedMessageResultAlready <- 
validateMDNNotAlreadySent(mdnRelatedMessageResult)
   messageRelated = parseAsMessage(mdnRelatedMessageResultAlready)
-  mailAndResponseAndId <- buildMailAndResponse(identity, 
session.getUser.asString(), requestEntry, messageRelated)
+  mailAndResponseAndId <- buildMailAndResponse(identity, 
session.getUser.asString(), requestEntry, messageRelated, session)
   _ <- Try(enqueue(mailAndResponseAndId._1)).toEither
 } yield {
   MDNSendCreateSuccess(
@@ -178,19 +179,19 @@ class MDNSendMethod @Inject()(serializer: MDNSerializer,
   scala.Right(relatedMessageResult)
 }
 
-  private def buildMailAndResponse(identity: Identity, sender: String, 
requestEntry: MDNSendCreateRequest, originalMessage: Message): 
Either[Throwable, (MailImpl, MDNSendCreateResponse)] =
+  private def buildMailAndResponse(identity: Identity, sender: String, 
requestEntry: MDNSendCreateRequest, originalMessage: Message, mailboxSession: 
MailboxSession): Either[Throwable, (MailImpl, MDNSendCreateResponse)] =
 for {
   mailRecipient <- getMailRecipient(originalMessage)
   mdnFinalRecipient <- getMDNFinalRecipient(requestEntry, identity)
   mdnOriginalRecipient = 
OriginalRecipient.builder().originalRecipient(Text.fromRawText(sender)).build()
   mdn = buildMDN(requestEntry, originalMessage, mdnFinalRecipient, 
mdnOriginalRecipient)
   subject = buildMessageSubject(requestEntry, originalMessage)
-  (mailImpl, mimeMessage) = buildMailAndMimeMessage(sender, mailRecipient, 
subject, mdn)
+  (mailImpl, mimeMessage) = buildMailAndMimeMessage(sender, mailRecipient, 
subject, mdn, mailboxSession)
 } yield {
   (mailImpl, buildMDNSendCreateResponse(requestEntry, mdn, mimeMessage))
 }
 
-  private def buildMailAndMimeMessage(sender: String, recipient: String, 
subject: String, mdn: MDN): (MailImpl, MimeMessage) = {
+  private def buildMailAndMimeMessage(sender: String, recipient: String, 
subject: String, mdn: MDN, mailboxSession: MailboxSession): (MailImpl, 
MimeMessage) = {
 val mimeMessage: MimeMessage = mdn.asMimeMessage()
 mimeMessage.setFrom(sender)
 mimeMessage.setRecipients(jakarta.mail.Message.RecipientType.TO, recipient)
@@ -202,6 +203,7 @@ class MDNSendMethod @Inject()(serializer: MDNSerializer,
   .sender(sender)
   .addRecipient(recipient)
   .mimeMessage(mimeMessage)
+  .addAttribute(new Attribute(MAIL_METADATA_USERNAME_ATTRIBUTE, 
AttributeValue.of(mailboxSession.getUser.asString(
   .build()
 mailImpl -> mimeMessage
   }


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: 

Re: [PR] JAMES-4013 Relay MDN/send [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2062:
URL: https://github.com/apache/james-project/pull/2062


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: JAMES-4011 Use MIME4J to decode filename

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier 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 4f77aab13a JAMES-4011 Use MIME4J to decode filename
4f77aab13a is described below

commit 4f77aab13a6696f1417b4cb4728ed26b34a9de74
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 08:50:45 2024 +0100

JAMES-4011 Use MIME4J to decode filename

This is more lenient
---
 .../james/transport/mailets/StripAttachment.java   | 20 ++--
 .../transport/mailets/StripAttachmentTest.java | 37 ++
 mailet/standard/src/test/resources/mime/space.eml  | 24 ++
 3 files changed, 79 insertions(+), 2 deletions(-)

diff --git 
a/mailet/standard/src/main/java/org/apache/james/transport/mailets/StripAttachment.java
 
b/mailet/standard/src/main/java/org/apache/james/transport/mailets/StripAttachment.java
index 459e7fb0d4..115b5bd45e 100644
--- 
a/mailet/standard/src/main/java/org/apache/james/transport/mailets/StripAttachment.java
+++ 
b/mailet/standard/src/main/java/org/apache/james/transport/mailets/StripAttachment.java
@@ -50,6 +50,11 @@ import 
org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
 import org.apache.james.javax.MultipartUtil;
 import org.apache.james.mime4j.codec.DecodeMonitor;
 import org.apache.james.mime4j.codec.DecoderUtil;
+import org.apache.james.mime4j.dom.field.ContentDispositionField;
+import org.apache.james.mime4j.field.ContentDispositionFieldLenientImpl;
+import org.apache.james.mime4j.field.ContentTypeFieldLenientImpl;
+import org.apache.james.mime4j.stream.Field;
+import org.apache.james.mime4j.stream.RawField;
 import org.apache.mailet.Attribute;
 import org.apache.mailet.AttributeName;
 import org.apache.mailet.AttributeUtils;
@@ -385,7 +390,18 @@ public class StripAttachment extends GenericMailet {
 
 @VisibleForTesting String getFilename(BodyPart bodyPart) {
 try {
-String fileName = bodyPart.getFileName();
+String fileName = 
Optional.ofNullable(bodyPart.getHeader("Content-Disposition"))
+.map(h -> h[0])
+.map(h -> new RawField("Content-Disposition", h))
+.map(h -> ContentDispositionFieldLenientImpl.PARSER.parse(h, 
DecodeMonitor.SILENT))
+.map(ContentDispositionField::getFilename)
+.or(Throwing.supplier(() -> 
Optional.ofNullable(bodyPart.getHeader("Content-Type"))
+.map(h -> h[0])
+.map(h -> new RawField("Content-Type", h))
+.map(h -> ContentTypeFieldLenientImpl.PARSER.parse(h, 
DecodeMonitor.SILENT))
+.map(Field::getName)).sneakyThrow())
+.orElse(null);
+
 if (fileName != null) {
 return 
renameWithConfigurationPattern(decodeFilename(fileName));
 }
@@ -467,7 +483,7 @@ public class StripAttachment extends GenericMailet {
 }
 
 private File outputFile(Part part, Optional fileName) throws 
MessagingException, IOException {
-Optional maybePartFileName = 
Optional.ofNullable(part.getFileName());
+Optional maybePartFileName = fileName.or(Throwing.supplier(() 
-> Optional.ofNullable(part.getFileName())).sneakyThrow());
 return createTempFile(fileName.orElse(maybePartFileName.orElse(null)));
 }
 
diff --git 
a/mailet/standard/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
 
b/mailet/standard/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
index c2e4a3efd3..a374b5d1c9 100644
--- 
a/mailet/standard/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
+++ 
b/mailet/standard/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
@@ -44,6 +44,8 @@ import org.apache.james.core.builder.MimeMessageBuilder;
 import org.apache.james.junit.TemporaryFolderExtension;
 import org.apache.james.junit.TemporaryFolderExtension.TemporaryFolder;
 import org.apache.james.transport.mailets.StripAttachment.OutputFileName;
+import org.apache.james.util.ClassLoaderUtils;
+import org.apache.james.util.MimeMessageUtil;
 import org.apache.mailet.AttributeName;
 import org.apache.mailet.AttributeUtils;
 import org.apache.mailet.AttributeValue;
@@ -340,6 +342,41 @@ class StripAttachmentTest {
 .hasValueSatisfying(assertValue.sneakyThrow());
 }
 
+@Test
+void serviceShouldHandleFilenameWithSpace(TemporaryFolder temporaryFolder) 
throws Exception {
+StripAttachment mailet = new StripAttachment();
+
+String customAttribute = "my.custom.attribute";
+FakeMailetConfig mci = FakeMailetConfig.builder()
+.mailetName("Test")
+.setProperty("remove", "matched")
+.setProperty("directory", temporaryFolder.getFolderPath())
+.setProperty("pattern", 

Re: [PR] JAMES-4011 Use MIME4J to decode filename [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2056:
URL: https://github.com/apache/james-project/pull/2056


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: [UPGRADE] MIME4J 0.8.9 -> 0.8.10 (#2058)

2024-02-27 Thread rcordier
This is an automated email from the ASF dual-hosted git repository.

rcordier 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 fc1966682f [UPGRADE] MIME4J 0.8.9 -> 0.8.10 (#2058)
fc1966682f is described below

commit fc1966682f08752e2a7933e62e7a95f35942b369
Author: Benoit TELLIER 
AuthorDate: Wed Feb 28 03:21:16 2024 +0100

[UPGRADE] MIME4J 0.8.9 -> 0.8.10 (#2058)
---
 mailbox/store/src/test/resources/eml/james-3901.json | 9 -
 pom.xml  | 2 +-
 .../james/jmap/draft/methods/MIMEMessageConverterTest.java   | 3 +--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/mailbox/store/src/test/resources/eml/james-3901.json 
b/mailbox/store/src/test/resources/eml/james-3901.json
index bc81ce5978..bcedb73bc8 100644
--- a/mailbox/store/src/test/resources/eml/james-3901.json
+++ b/mailbox/store/src/test/resources/eml/james-3901.json
@@ -1,4 +1,11 @@
-{"attachments":[],
+{"attachments":[{
+"mediaType":"application",
+"subtype":"octet-stream",
+"fileName":"4%P001!.DOC4%P001!.DOC",
+"fileExtension":"DOC",
+"contentDisposition":"attachment",
+"textContent":null}
+  ],
   "bcc":[],
   "htmlBody":null,
   "textBody":"-- Forwarded by Drew Fossum/ET/Enron on 
04/04/2001 \n01:19 PM ---\n\n\n\"Hirasuna, Robert\" 
 on 04/04/2001 10:18:00 AM\nTo: \"Drew Fossum 
(E-mail)\" \ncc:  \n\nSubject: Revised Draft\n\n\n 
<<4%P001!.DOC>> Use this draft instead.  I missed a couple of delted dashes 
\non the first page.\n\nThe information contained in this e-mail message is 
intended only for the \npersonal and confidentia [...]
diff --git a/pom.xml b/pom.xml
index 0df0fd6e7d..5134ccdcab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -599,7 +599,7 @@
 org.apache.james
 
${james.groupId}.protocols
 5.18.3
-0.8.9
+0.8.10
 3.2.0
 10.14.2.0
 2.20.0
diff --git 
a/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/methods/MIMEMessageConverterTest.java
 
b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/methods/MIMEMessageConverterTest.java
index 24feb19418..00e81b6b52 100644
--- 
a/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/methods/MIMEMessageConverterTest.java
+++ 
b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/methods/MIMEMessageConverterTest.java
@@ -801,7 +801,6 @@ class MIMEMessageConverterTest {
 String expectedMimeType = "image/png";
 String text = "123456";
 String name = "ديناصور.png";
-String expectedName = EncoderUtil.encodeEncodedWord(name, 
Usage.TEXT_TOKEN);
 AttachmentId blodId = AttachmentId.from("blodId");
 
 Attachment.WithBlob attachment = new Attachment.WithBlob(
@@ -829,7 +828,7 @@ class MIMEMessageConverterTest {
 .hasSize(1)
 .extracting(entity -> (Multipart) entity.getBody())
 .flatExtracting(Multipart::getBodyParts)
-.anySatisfy(part -> 
assertThat(getNameParameterValue(part)).isEqualTo(expectedName));
+.anySatisfy(part -> 
assertThat(getNameParameterValue(part)).isEqualTo(name));
 }
 
 


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [UPGRADE] MIME4J 0.8.9 -> 0.8.10 [james-project]

2024-02-27 Thread via GitHub


Arsnael merged PR #2058:
URL: https://github.com/apache/james-project/pull/2058


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] WIP Enforce a separate keyspace for blob store cache [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on code in PR #2060:
URL: https://github.com/apache/james-project/pull/2060#discussion_r1505244208


##
server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraCacheSessionModule.java:
##
@@ -72,12 +71,8 @@ static class InitializedCacheCluster {
 private final CqlSession cluster;
 
 @Inject
-private InitializedCacheCluster(CqlSession cluster, 
ClusterConfiguration clusterConfiguration, KeyspacesConfiguration 
keyspacesConfiguration) {
-this.cluster = cluster;
-
-if (clusterConfiguration.shouldCreateKeyspace()) {
-
KeyspaceFactory.createKeyspace(keyspacesConfiguration.cacheKeyspaceConfiguration(),
 cluster).block();
-}
+private InitializedCacheCluster(ResilientClusterProvider 
sessionProvider, KeyspacesConfiguration keyspacesConfiguration) {
+this.cluster = 
sessionProvider.get(keyspacesConfiguration.cacheKeyspaceConfiguration());

Review Comment:
   we don't create the keyspace anymore if it does not already exist? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] WIP Enforce a separate keyspace for blob store cache [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on code in PR #2060:
URL: https://github.com/apache/james-project/pull/2060#discussion_r1505244208


##
server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraCacheSessionModule.java:
##
@@ -72,12 +71,8 @@ static class InitializedCacheCluster {
 private final CqlSession cluster;
 
 @Inject
-private InitializedCacheCluster(CqlSession cluster, 
ClusterConfiguration clusterConfiguration, KeyspacesConfiguration 
keyspacesConfiguration) {
-this.cluster = cluster;
-
-if (clusterConfiguration.shouldCreateKeyspace()) {
-
KeyspaceFactory.createKeyspace(keyspacesConfiguration.cacheKeyspaceConfiguration(),
 cluster).block();
-}
+private InitializedCacheCluster(ResilientClusterProvider 
sessionProvider, KeyspacesConfiguration keyspacesConfiguration) {
+this.cluster = 
sessionProvider.get(keyspacesConfiguration.cacheKeyspaceConfiguration());

Review Comment:
   we don't create the keyspace anymore if it's necessary? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-4003 [FIX] Avoid forwarding bounces as it might create infinite loops [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on code in PR #2022:
URL: https://github.com/apache/james-project/pull/2022#discussion_r1505240328


##
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTableProcessor.java:
##
@@ -182,7 +186,8 @@ public RecipientRewriteTableProcessor(RecipientRewriteTable 
virtualTableStore, D
 }
 
 public RecipientRewriteTableProcessor(RecipientRewriteTable 
virtualTableStore, DomainList domainList, MailetContext mailetContext) {
-this(virtualTableStore, domainList, mailetContext, new 
ProcessingState(Mail.ERROR), !REWRITE_SENDER_UPON_FORWARD);
+this(virtualTableStore, domainList, mailetContext, new 
ProcessingState(Mail.ERROR), !REWRITE_SENDER_UPON_FORWARD,
+false);

Review Comment:
   ```suggestion
   !FORWARD_AUTOMATED_EMAILS);
   ```
   
   That or delete `FORWARD_AUTOMATED_EMAILS` as it does not seem used if not 
for this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] [BUILD] RemoteDeliveryErrorHandlingTest was unstable [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2064:
URL: https://github.com/apache/james-project/pull/2064

   As we did not await task execution the seond mail repository reprocessing 
could be triggered while the first one was not even started which would go 
undetected.
   
   Strictier awaits does the trick


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) 01/01: [BUILD] RemoteDeliveryErrorHandlingTest was unstable

2024-02-27 Thread btellier
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch build-stability-27-02-20204
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 95b736e7825311e128e42818e41129e8268aa8c2
Author: Benoit TELLIER 
AuthorDate: Tue Feb 27 22:31:29 2024 +0100

[BUILD] RemoteDeliveryErrorHandlingTest was unstable

As we did not await task execution the seond mail repository
reprocessing could be triggered while the first one was not
even started which would go undetected.

Strictier awaits does the trick
---
 .../mailets/RemoteDeliveryErrorHandlingTest.java   | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git 
a/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
 
b/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
index 96aab51829..10ef0704a6 100644
--- 
a/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
+++ 
b/server/mailet/remote-delivery-integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryErrorHandlingTest.java
@@ -249,22 +249,36 @@ class RemoteDeliveryErrorHandlingTest {
 .isEqualTo(1));
 
 // When we retry and temporary problem is not solved
-given()
+Object taskId = given()
 .spec(webAdminApi)
 .param("action", "reprocess")
 .param("queue", MailQueueFactory.SPOOL.asString())
 .param("processor", TRANSPORT_PROCESSOR)
-.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails");
+.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails")
+.body()
+.jsonPath()
+.get("taskId");
+
+given()
+.spec(webAdminApi)
+.get("/tests/" + taskId + "/await");
+
 awaitAtMostOneMinute
 .untilAsserted(() -> 
assertThat(jamesServer.getProbe(MailRepositoryProbeImpl.class)
 
.getRepositoryMailCount(REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY))
 .isEqualTo(1));
-given()
+Object taskId2 = given()
 .spec(webAdminApi)
 .param("action", "reprocess")
 .param("queue", MailQueueFactory.SPOOL.asString())
 .param("processor", TRANSPORT_PROCESSOR)
-.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails");
+.patch("/mailRepositories/" + 
REMOTE_DELIVERY_TEMPORARY_ERROR_REPOSITORY.getPath().urlEncoded() + "/mails")
+.body()
+.jsonPath()
+.get("taskId");
+given()
+.spec(webAdminApi)
+.get("/tests/" + taskId2 + "/await");
 
 // Then mail should be stored in permanent error repository
 awaitAtMostOneMinute


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch build-stability-27-02-20204 created (now 95b736e782)

2024-02-27 Thread btellier
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a change to branch build-stability-27-02-20204
in repository https://gitbox.apache.org/repos/asf/james-project.git


  at 95b736e782 [BUILD] RemoteDeliveryErrorHandlingTest was unstable

This branch includes the following new commits:

 new 95b736e782 [BUILD] RemoteDeliveryErrorHandlingTest was unstable

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: JAMES-3885 Webadmin route to change of username - support `force` parameter - do not require old user to exist (#2054)

2024-02-27 Thread btellier
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 4f064d3ee3 JAMES-3885 Webadmin route to change of username - support 
`force` parameter  - do not require old user to exist (#2054)
4f064d3ee3 is described below

commit 4f064d3ee3b22a81e09c262df1524afc03eb6508
Author: vttran 
AuthorDate: Wed Feb 28 02:51:11 2024 +0700

JAMES-3885 Webadmin route to change of username - support `force` parameter 
 - do not require old user to exist (#2054)

- do not require old user to exist
---
 .../docs/modules/ROOT/pages/operate/webadmin.adoc  |  2 +-
 .../webadmin/routes/UsernameChangeRoutes.java  |  3 +-
 .../webadmin/routes/UsernameChangeRoutesTest.java  | 39 ++
 src/site/markdown/server/manage-webadmin.md|  2 +-
 4 files changed, 43 insertions(+), 3 deletions(-)

diff --git 
a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc 
b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
index 0ff242d344..81ab4f0c00 100644
--- a/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
+++ b/server/apps/distributed-app/docs/modules/ROOT/pages/operate/webadmin.adoc
@@ -683,7 +683,7 @@ Implemented migration steps are:
 Response codes:
 
 * 201: Success. Corresponding task id is returned.
-* 400: Error in the request. Details can be found in the reported error.
+* 400: Error in the request. Details can be found in the reported error. If 
you encounter the error "'oldUser' parameter should be an existing user," 
please note that this validation can be bypassed by specifying the `force` 
query parameter.
 
 The `fromStep` query parameter allows skipping previous steps, allowing to 
resume the username change from a failed step.
 
diff --git 
a/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/UsernameChangeRoutes.java
 
b/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/UsernameChangeRoutes.java
index f87dfecb51..b74fc450ea 100644
--- 
a/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/UsernameChangeRoutes.java
+++ 
b/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/UsernameChangeRoutes.java
@@ -42,6 +42,7 @@ import spark.Service;
 public class UsernameChangeRoutes implements Routes {
 private static final String OLD_USER_PARAM = "oldUser";
 private static final String NEW_USER_PARAM = "newUser";
+private static final String FORCE_PARAM = "force";
 private static final String ROOT_PATH = "/users/:" + OLD_USER_PARAM + 
"/rename/:" + NEW_USER_PARAM;
 private static final TaskRegistrationKey RENAME = 
TaskRegistrationKey.of("rename");
 
@@ -73,7 +74,7 @@ public class UsernameChangeRoutes implements Routes {
 Username oldUser = Username.of(request.params(OLD_USER_PARAM));
 Username newUser = Username.of(request.params(NEW_USER_PARAM));
 
-Preconditions.checkArgument(usersRepository.contains(oldUser), 
"'oldUser' parameter should be an existing user");
+Preconditions.checkArgument(request.queryParams(FORCE_PARAM) != 
null || usersRepository.contains(oldUser), "'oldUser' parameter should be an 
existing user");
 Preconditions.checkArgument(usersRepository.contains(newUser), 
"'newUser' parameter should be an existing user");
 
 Optional fromStep = 
Optional.ofNullable(request.queryParams("fromStep")).map(StepName::new);
diff --git 
a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java
 
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java
index 26ec2cf710..34d95957ac 100644
--- 
a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java
+++ 
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java
@@ -22,6 +22,7 @@ package org.apache.james.webadmin.routes;
 import static io.restassured.RestAssured.given;
 import static io.restassured.RestAssured.with;
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.hamcrest.Matchers.notNullValue;
 import static org.hamcrest.core.Is.is;
 import static org.mockito.Mockito.mock;
 
@@ -191,6 +192,44 @@ class UsernameChangeRoutesTest {
 .body("message", Matchers.is("Invalid arguments supplied in 
the user request"))
 .body("details", Matchers.is("'oldUser' parameter should be an 
existing user"));
 }
+
+@Test
+void shouldAcceptUnknownSourceUserWhenForce() {
+given()
+.queryParam("action", "rename")

Re: [PR] JAMES-3885 Webadmin route to change of username - support `force` parameter - do not require old user to exist [james-project]

2024-02-27 Thread via GitHub


chibenwa merged PR #2054:
URL: https://github.com/apache/james-project/pull/2054


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] MailSizeEsmtpExtension - change log level when Quota exceeded [james-project]

2024-02-27 Thread via GitHub


chibenwa merged PR #2053:
URL: https://github.com/apache/james-project/pull/2053


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



(james-project) branch master updated: MailSizeEsmtpExtension - change log level when Quota exceeded (#2053)

2024-02-27 Thread btellier
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 4f38296f28 MailSizeEsmtpExtension - change log level when Quota 
exceeded (#2053)
4f38296f28 is described below

commit 4f38296f2851d2de68006281d26eb0938e6ede1d
Author: vttran 
AuthorDate: Tue Feb 27 21:24:59 2024 +0700

MailSizeEsmtpExtension - change log level when Quota exceeded (#2053)
---
 .../james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java   | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
 
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
index 9de63f01ce..a2f90e9d67 100644
--- 
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
+++ 
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/MailSizeEsmtpExtension.java
@@ -117,8 +117,8 @@ public class MailSizeEsmtpExtension implements 
MailParametersHook, EhloExtension
 long maxMessageSize = session.getConfiguration().getMaxMessageSize();
 if ((maxMessageSize > 0) && (size > maxMessageSize)) {
 // Let the client know that the size limit has been hit.
-LOGGER.error("Rejected message from {} to {} of size {} exceeding 
system maximum message size of {} based on SIZE option.",
-tempSender,
+LOGGER.info("Rejected message from {} to {} of size {} exceeding 
system maximum message size of {} based on SIZE option.",
+tempSender.asPrettyString(),
 session.getRemoteAddress().getAddress().getHostAddress(),
 size,
 maxMessageSize);
@@ -178,7 +178,9 @@ public class MailSizeEsmtpExtension implements 
MailParametersHook, EhloExtension
 public HookResult onMessage(SMTPSession session, MailEnvelope mail) {
 Optional failed = session.getAttachment(MESG_FAILED, 
State.Transaction);
 if (failed.orElse(false)) {
-LOGGER.error("Rejected message from {} from {} exceeding system 
maximum message size of {}", session.getAttachment(SMTPSession.SENDER, 
State.Transaction), session.getRemoteAddress().getAddress().getHostAddress(), 
session.getConfiguration().getMaxMessageSize());
+LOGGER.info("Rejected message from {} from {} exceeding system 
maximum message size of {}",
+session.getAttachment(SMTPSession.SENDER, 
State.Transaction).orElse(MaybeSender.nullSender()).asPrettyString(),
+session.getRemoteAddress().getAddress().getHostAddress(), 
session.getConfiguration().getMaxMessageSize());
 return QUOTA_EXCEEDED;
 } else {
 return HookResult.DECLINED;


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Revert git commit id maven plugin [james-project]

2024-02-27 Thread via GitHub


chibenwa commented on PR #2049:
URL: https://github.com/apache/james-project/pull/2049#issuecomment-1966592116

   https://github.com/apache/james-project/pull/2063


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] [BUILD] Use git-commit-id-maven-plugin in ci-test [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2063:
URL: https://github.com/apache/james-project/pull/2063

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [BUILD] Use git-commit-id-maven-plugin in server/apps only [james-project]

2024-02-27 Thread via GitHub


chibenwa closed pull request #2050: [BUILD] Use git-commit-id-maven-plugin in 
server/apps only
URL: https://github.com/apache/james-project/pull/2050


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [BUILD] Use git-commit-id-maven-plugin in server/apps only [james-project]

2024-02-27 Thread via GitHub


chibenwa commented on PR #2050:
URL: https://github.com/apache/james-project/pull/2050#issuecomment-1966559478

   You convinced me @jeantil 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] JAMES-4013 Relay MDN/send [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2062:
URL: https://github.com/apache/james-project/pull/2062

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [BUILD] Use git-commit-id-maven-plugin in server/apps only [james-project]

2024-02-27 Thread via GitHub


jeantil commented on PR #2050:
URL: https://github.com/apache/james-project/pull/2050#issuecomment-1966546136

   It's should be possible to completely disable the plugin by command line
   parameter. I'll try to look it up but as I said limited connectivity
   
   Ideally the plugin should be associated to a profile to be used only for ci
   and release of James.
   
   
   I am hesitant about not including the version in every artifact. For people
   pulling snapshots it felt like a useful feature
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] [FIX] java.util.NoSuchElementException: requestDecoder [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2061:
URL: https://github.com/apache/james-project/pull/2061

   Instead, we replace the framer in-place


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] WIP Enforce a separate keyspace for blob store cache [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2060:
URL: https://github.com/apache/james-project/pull/2060

   This was broken, likely upon the cassandra driver upgrade


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] [FIX] Remove a benign log in DeletedMessageVaultDeletionCallback [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2059:
URL: https://github.com/apache/james-project/pull/2059

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-4003 [FIX] Avoid forwarding bounces as it might create infinite loops [james-project]

2024-02-27 Thread via GitHub


chibenwa commented on PR #2022:
URL: https://github.com/apache/james-project/pull/2022#issuecomment-1966254047

   Any thoughts on this work?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] [UPGRADE] MIME4J 0.8.9 -> 0.8.10 [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2058:
URL: https://github.com/apache/james-project/pull/2058

   Solves https://github.com/linagora/james-project/issues/5080


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-4007 Getting a second shot at IMAP large litteral management [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on PR #2052:
URL: https://github.com/apache/james-project/pull/2052#issuecomment-1966185075

   09:47:37,400 [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-checkstyle-plugin:3.3.0:check (check-style) on 
project james-server-protocols-imap4: You have 2 Checkstyle violations. -> 
[Help 1]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-2586 Integration tests for JMAP postgres [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on PR #2029:
URL: https://github.com/apache/james-project/pull/2029#issuecomment-1966104255

   I think should do it... the rabbitmq.properties file that you added 
@hungphan227 created issues. Because of it it was thinking of using rabbitmq 
for all tests classes in server/apps/postgres-app. There was an injection issue 
(user and password missing for uri management)
   
   Also not all tests are using rabbitmq.
   
   Rabbitmq values are being injected into the conf in the tests that need it 
btw, so unnecessary change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



[PR] JAMES-4012 Lenient MDN parsing for human readable part [james-project]

2024-02-27 Thread via GitHub


chibenwa opened a new pull request, #2057:
URL: https://github.com/apache/james-project/pull/2057

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-3885 Webadmin route to change of username - support `force` parameter - do not require old user to exist [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on code in PR #2054:
URL: https://github.com/apache/james-project/pull/2054#discussion_r1503795915


##
server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java:
##
@@ -191,6 +192,18 @@ void shouldRejectUnknownSourceUser() {
 .body("message", Matchers.is("Invalid arguments supplied in 
the user request"))
 .body("details", Matchers.is("'oldUser' parameter should be an 
existing user"));
 }
+
+@Test
+void shouldAcceptUnknownSourceUserUserWhenForce() {

Review Comment:
   Sorry:
   
   ```suggestion
   void shouldAcceptUnknownSourceUserWhenForce() {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] [BUILD] Use git-commit-id-maven-plugin in server/apps only [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on PR #2050:
URL: https://github.com/apache/james-project/pull/2050#issuecomment-1965986660

   > We do not have a command line option to diable that plugin in tmail build?
   
   https://github.com/apache/james-project/pull/2049#issuecomment-1963452919


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-3885 Webadmin route to change of username - support `force` parameter - do not require old user to exist [james-project]

2024-02-27 Thread via GitHub


vttranlina commented on code in PR #2054:
URL: https://github.com/apache/james-project/pull/2054#discussion_r1503794703


##
server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java:
##
@@ -191,6 +192,18 @@ void shouldRejectUnknownSourceUser() {
 .body("message", Matchers.is("Invalid arguments supplied in 
the user request"))
 .body("details", Matchers.is("'oldUser' parameter should be an 
existing user"));
 }
+
+@Test
+void shouldAcceptUnknownSourceUserUserWhenForce() {

Review Comment:
   I don't see any changes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] JAMES-3885 Webadmin route to change of username - support `force` parameter - do not require old user to exist [james-project]

2024-02-27 Thread via GitHub


Arsnael commented on code in PR #2054:
URL: https://github.com/apache/james-project/pull/2054#discussion_r1503791303


##
server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/UsernameChangeRoutesTest.java:
##
@@ -191,6 +192,18 @@ void shouldRejectUnknownSourceUser() {
 .body("message", Matchers.is("Invalid arguments supplied in 
the user request"))
 .body("details", Matchers.is("'oldUser' parameter should be an 
existing user"));
 }
+
+@Test
+void shouldAcceptUnknownSourceUserUserWhenForce() {

Review Comment:
   ```suggestion
   void shouldAcceptUnknownSourceUserUserWhenForce() {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org