You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2026/08/23 07:55:04 UTC
[PR] Parse rfc6532 addresses [james-project]
chibenwa opened a new pull request, #3130:
URL: https://github.com/apache/james-project/pull/3130
(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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5631669818
https://github.com/jakartaee/mail-api/pull/833 was merged today, eliminating one buglet in this PR.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959155181
##########
server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SmtpUtf8AnnounceTest.java:
##########
@@ -49,30 +58,87 @@ void tearDown() {
@Test
void ehloShouldAnnounceSmtpUtf8() throws Exception {
- SMTPClient smtpProtocol = new SMTPClient();
- InetSocketAddress bindedAddress = testSystem.getBindedAddress();
- smtpProtocol.connect(bindedAddress.getAddress().getHostAddress(), bindedAddress.getPort());
+ SMTPClient smtpProtocol = connect();
smtpProtocol.sendCommand("EHLO localhost");
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
- softly.assertThat(smtpProtocol.getReplyString())
- .contains("250-SMTPUTF8");
+ softly.assertThat(smtpProtocol.getReplyString()).contains("SMTPUTF8");
});
}
@Test
- void trivialEmailWithSmtpUtf8ShouldBeReceived() throws Exception {
- SMTPClient smtpProtocol = new SMTPClient();
- InetSocketAddress bindedAddress = testSystem.getBindedAddress();
- smtpProtocol.connect(bindedAddress.getAddress().getHostAddress(), bindedAddress.getPort());
+ void ehloShouldAnnounceSmtpUtf8Once() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO localhost");
+
+ // EhloCmdHandler appends one line per EhloExtension without
+ // deduplicating, so a second handler advertising the keyword would
+ // silently produce a duplicate 250- line.
+ assertThat(smtpProtocol.getReplyString().split("SMTPUTF8", -1)).hasSize(2);
+ }
+ @Test
+ void unicodeAddressesShouldBeAcceptedWhenSmtpUtf8IsRequested() throws Exception {
+ SMTPClient smtpProtocol = connect();
smtpProtocol.sendCommand("EHLO remote.org");
- smtpProtocol.sendCommand("MAIL FROM: <bo...@remote.org> SMTPUTF8");
- smtpProtocol.sendCommand("RCPT TO:<rc...@localhost> SMTPUTF8");
- smtpProtocol.sendShortMessageData("From: bob@localhost\r\n\r\nSubject: test mail\r\n\r\nTest body testSimpleMailSendWithDSN\r\n.\r\n");
+ smtpProtocol.sendCommand("MAIL FROM: <" + UTF8_SENDER + "> SMTPUTF8");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendCommand("RCPT TO:<" + UTF8_RECIPIENT + ">");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendShortMessageData("From: " + UTF8_SENDER + "\r\nSubject: test\r\n\r\nbody\r\n.\r\n");
Mail lastMail = testSystem.queue.getLastMail();
assertThat(lastMail).isNotNull();
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(lastMail.getMaybeSender().asString()).isEqualTo(UTF8_SENDER);
+ softly.assertThat(lastMail.getRecipients())
+ .extracting(rcpt -> rcpt.asString())
+ .containsExactly(UTF8_RECIPIENT);
+ });
+ }
+
+ @Test
+ void nonAsciiSenderShouldBeRejectedWithoutSmtpUtf8() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO remote.org");
+ smtpProtocol.sendCommand("MAIL FROM: <" + UTF8_SENDER + ">");
+
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(553);
+ softly.assertThat(smtpProtocol.getReplyString()).contains(NON_ASCII_WITHOUT_SMTPUTF8);
+ });
+ }
+
+ @Test
+ void nonAsciiRecipientShouldBeRejectedWithoutSmtpUtf8() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO remote.org");
+ smtpProtocol.sendCommand("MAIL FROM: <bo...@remote.org>");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendCommand("RCPT TO:<" + UTF8_RECIPIENT + ">");
+
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(553);
+ softly.assertThat(smtpProtocol.getReplyString()).contains(NON_ASCII_WITHOUT_SMTPUTF8);
+ });
+ }
+
+ @Test
+ void asciiEmailWithSmtpUtf8ShouldBeReceived() throws Exception {
Review Comment:
Simply that we can use ascii addresses with SMTPUTF8
Maybe not the most useful of a test but defnitly harmless.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959084391
##########
server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SmtpUtf8AnnounceTest.java:
##########
@@ -49,30 +58,87 @@ void tearDown() {
@Test
void ehloShouldAnnounceSmtpUtf8() throws Exception {
- SMTPClient smtpProtocol = new SMTPClient();
- InetSocketAddress bindedAddress = testSystem.getBindedAddress();
- smtpProtocol.connect(bindedAddress.getAddress().getHostAddress(), bindedAddress.getPort());
+ SMTPClient smtpProtocol = connect();
smtpProtocol.sendCommand("EHLO localhost");
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
- softly.assertThat(smtpProtocol.getReplyString())
- .contains("250-SMTPUTF8");
+ softly.assertThat(smtpProtocol.getReplyString()).contains("SMTPUTF8");
});
}
@Test
- void trivialEmailWithSmtpUtf8ShouldBeReceived() throws Exception {
- SMTPClient smtpProtocol = new SMTPClient();
- InetSocketAddress bindedAddress = testSystem.getBindedAddress();
- smtpProtocol.connect(bindedAddress.getAddress().getHostAddress(), bindedAddress.getPort());
+ void ehloShouldAnnounceSmtpUtf8Once() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO localhost");
+
+ // EhloCmdHandler appends one line per EhloExtension without
+ // deduplicating, so a second handler advertising the keyword would
+ // silently produce a duplicate 250- line.
+ assertThat(smtpProtocol.getReplyString().split("SMTPUTF8", -1)).hasSize(2);
+ }
+ @Test
+ void unicodeAddressesShouldBeAcceptedWhenSmtpUtf8IsRequested() throws Exception {
+ SMTPClient smtpProtocol = connect();
smtpProtocol.sendCommand("EHLO remote.org");
- smtpProtocol.sendCommand("MAIL FROM: <bo...@remote.org> SMTPUTF8");
- smtpProtocol.sendCommand("RCPT TO:<rc...@localhost> SMTPUTF8");
- smtpProtocol.sendShortMessageData("From: bob@localhost\r\n\r\nSubject: test mail\r\n\r\nTest body testSimpleMailSendWithDSN\r\n.\r\n");
+ smtpProtocol.sendCommand("MAIL FROM: <" + UTF8_SENDER + "> SMTPUTF8");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendCommand("RCPT TO:<" + UTF8_RECIPIENT + ">");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendShortMessageData("From: " + UTF8_SENDER + "\r\nSubject: test\r\n\r\nbody\r\n.\r\n");
Mail lastMail = testSystem.queue.getLastMail();
assertThat(lastMail).isNotNull();
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(lastMail.getMaybeSender().asString()).isEqualTo(UTF8_SENDER);
+ softly.assertThat(lastMail.getRecipients())
+ .extracting(rcpt -> rcpt.asString())
+ .containsExactly(UTF8_RECIPIENT);
+ });
+ }
+
+ @Test
+ void nonAsciiSenderShouldBeRejectedWithoutSmtpUtf8() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO remote.org");
+ smtpProtocol.sendCommand("MAIL FROM: <" + UTF8_SENDER + ">");
+
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(553);
+ softly.assertThat(smtpProtocol.getReplyString()).contains(NON_ASCII_WITHOUT_SMTPUTF8);
+ });
+ }
+
+ @Test
+ void nonAsciiRecipientShouldBeRejectedWithoutSmtpUtf8() throws Exception {
+ SMTPClient smtpProtocol = connect();
+ smtpProtocol.sendCommand("EHLO remote.org");
+ smtpProtocol.sendCommand("MAIL FROM: <bo...@remote.org>");
+ assertThat(smtpProtocol.getReplyCode()).isEqualTo(250);
+ smtpProtocol.sendCommand("RCPT TO:<" + UTF8_RECIPIENT + ">");
+
+ SoftAssertions.assertSoftly(softly -> {
+ softly.assertThat(smtpProtocol.getReplyCode()).isEqualTo(553);
+ softly.assertThat(smtpProtocol.getReplyString()).contains(NON_ASCII_WITHOUT_SMTPUTF8);
+ });
+ }
+
+ @Test
+ void asciiEmailWithSmtpUtf8ShouldBeReceived() throws Exception {
Review Comment:
What does this test?
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6468985596
The secretary has filed the CLA and the merge still looks green as of this minute.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5588967660
You are very welcome!
Thanks for embarking us in this journey, I'm pretty sure we would not have been able to do it by our own.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6130827805
> it's just a question of getting the VP's signature onto the right PDF. Most likely a question of days.
+1 thans for the update!
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #3130:
URL: https://github.com/apache/james-project/pull/3130
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3946402917
##########
mailbox/opensearch/src/test/resources/eml/cve-2024-23184.eml:
##########
@@ -0,0 +1,45 @@
+MIME-Version: 1.0
Review Comment:
This file does not seem to be used at all in the code. Is it necessary to keep it?
##########
core/src/test/java/org/apache/james/core/DomainTest.java:
##########
@@ -0,0 +1,81 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.core;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.util.stream.Stream;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+
+class DomainTest {
+ @Test
+ void testPlainDomain() {
+ Domain d1 = Domain.of("example.com");
+ assertThat(d1.name().equals(d1.asString()));
Review Comment:
```suggestion
assertThat(d1.name().equals(d1.asString())).isTrue();
```
?
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3958793960
##########
server/mailet/integration-testing/src/test/java/org/apache/james/mailets/AddDeliveredToHeaderTest.java:
##########
@@ -84,24 +101,59 @@ void receivedMessagesShouldContainDeliveredToHeaders() throws Exception {
@Test
void receivedMessagesShouldContainDeliveredToHeadersI8N() throws Exception {
Review Comment:
Is that i8n instead of i18n?
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5726296956
Hello
I received a notice of ICLA.
I presume I need to wait for CCLA before merging this.
Have a good day!
Cheers,
Benoit
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6126846963
Hello @arnt ,
Do you have news regarding CCLA ?
Or should we concider ICLE enough for this case?
(We are quite lucky not to have rebase issue on this so far...)
Kind regards,
Benoit
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5585112012
I started the day with [opening tabs for my open PRs](https://rant.gulbrandsen.priv.no/work/task-tracker), which are many and the James PR is big ;) The only reason I could write the james patches was that several colleagues were travelling so I had unexpected peace.
Not done with the PR catching-upping, today's my first pass since June. Still have a few tabs to read and close, and James is one.
I'll send the corporate CLA to the legal team at work; it should not be a problem (apart from the GPG invocations, which I am afraid the legal team will leave to me).
I need lunch now, will review this after lunch.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5712967199
I submitted an ICLA. That's the nicest CLA contribution process I've been through so far. Still waiting on the CCLA review by the legal team. (I want to submit both, so that there can never be any doubt whether a particular PR is covered or not.)
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5704001551
I see, that makes sense. I pinged the legal team again tonight. That team is friendly, helpful and overworked, so the odds are 2:! in our favour ;)
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5523227719
(
Simple master rebase, no changes.
The ci failed with build compilation.
I suppose this is due to recent master changes causing compilation issue atop this branch: conflicts but without merge conflict.
)
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5639855688
(Just a rebase to solve the tiny conflict with master)
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5583215599
@arnt no objection with that one?
Also may I ask for a ICLA ? That's a major contribution, as per ASF rule we would need IP clearance.
https://www.apache.org/licenses/contributor-agreements.html
Thanks by advance
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959445482
##########
server/testing/src/main/java/org/apache/james/utils/TestIMAPClient.java:
##########
@@ -50,38 +50,76 @@ public class TestIMAPClient extends ExternalResource implements Closeable, After
private static final int MESSAGE_NUMBER_MATCHING_GROUP = 1;
public static final String INBOX = "INBOX";
- public static class Utf8IMAPSClient extends AuthenticatingIMAPClient {
+ /**
+ * commons-net announces and consumes IMAP literals in octets, but subtracts the
+ * {@link String#length()} of the lines it has decoded to know when a literal is over. Its
+ * streams therefore have to stay octet transparent - one char per octet, which is what its
+ * own ISO-8859-1 default gives. Decoding the socket as UTF-8 makes every multi-byte
+ * character count for one octet less than the server announced, so the client keeps reading
+ * past the literal, swallows the tagged reply as if it were message content and then blocks
+ * forever waiting for a completion line that has already gone by.
+ *
+ * UTF-8 is handled at {@link TestIMAPClient}'s own boundary instead: see
+ * {@link TestIMAPClient#asOctets(String)} and {@link TestIMAPClient#asText(String)}.
+ */
Review Comment:
Well, working around our own test dependencies o_o
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6291445142
Timezone problems are for another project @arnt I battle enough with them in Twake Calendar :-p
Thanks for the notice ! That's excellent news.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959294942
##########
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/MailDelivrerToHost.java:
##########
@@ -127,6 +127,20 @@ public ExecutionResult tryDeliveryToHost(Mail mail, Collection<InternetAddress>
// "mail.smtp.dsn.ret" //default to nothing... appended as RET= after MAIL FROM line.
// "mail.smtp.dsn.notify" //default to nothing... appended as NOTIFY= after RCPT TO line.
+ // Angus reads mail.mime.allowutf8 in the SMTPTransport constructor, so it
+ // has to be decided here -- before the transport exists, hence before we
+ // can know whether the remote advertises SMTPUTF8. The envelope alone
+ // tells us whether UTF-8 could ever be needed, and that is enough: Angus
+ // only emits the SMTPUTF8 keyword on MAIL FROM when the remote also
+ // advertises it, and SmtpUtf8Strategy below still decides the downgrade.
+ // Left alone for the ASCII envelopes that make up the bulk of the
+ // traffic, so they neither change behaviour nor trip Angus' "allowutf8
+ // set but server doesn't advertise SMTPUTF8" log line. The pool clears
+ // the property again when the session is passivated.
Review Comment:
Good point.
Looking at all this, I wonder why the tests passed.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959415094
##########
server/testing/src/main/java/org/apache/james/utils/TestIMAPClient.java:
##########
@@ -50,38 +50,76 @@ public class TestIMAPClient extends ExternalResource implements Closeable, After
private static final int MESSAGE_NUMBER_MATCHING_GROUP = 1;
public static final String INBOX = "INBOX";
- public static class Utf8IMAPSClient extends AuthenticatingIMAPClient {
+ /**
+ * commons-net announces and consumes IMAP literals in octets, but subtracts the
+ * {@link String#length()} of the lines it has decoded to know when a literal is over. Its
+ * streams therefore have to stay octet transparent - one char per octet, which is what its
+ * own ISO-8859-1 default gives. Decoding the socket as UTF-8 makes every multi-byte
+ * character count for one octet less than the server announced, so the client keeps reading
+ * past the literal, swallows the tagged reply as if it were message content and then blocks
+ * forever waiting for a completion line that has already gone by.
+ *
+ * UTF-8 is handled at {@link TestIMAPClient}'s own boundary instead: see
+ * {@link TestIMAPClient#asOctets(String)} and {@link TestIMAPClient#asText(String)}.
+ */
Review Comment:
I suppose it has to be like that. IMAP must read octets and decode to chars in a context-sensitive manner. While I find it difficult to name the octets "ISO-8859-1", given the legacy I suppose it makes sense.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5703763995
Hello @arnt
May I ask if CCLA and ICLA topics are moving forward?
I fear keeping his work open for long would create quite a bunch of conflicts...
(Sorry for not better anticipating ccla and icla topics...)
Regards,
Benoit
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959130654
##########
mdn/src/main/java/org/apache/james/mdn/MDN.java:
##########
@@ -193,6 +193,19 @@ public static Optional<MDNReport> extractMDNReport(List<Entity> entities) {
});
}
+ /**
+ * RFC 6533 defines {@code message/global-disposition-notification} as UTF-8;
+ * no charset parameter is defined for it, so senders legitimately omit one and
+ * mime4j then falls back to us-ascii. Only the RFC 3798 form honours the
+ * declared charset.
+ */
+ private static String reportCharset(Entity entity) {
Review Comment:
Thanks for the notice. We will follow upcoming RFCs when published I presume.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6130725239
I'm sorry about the delay. The legal team blessed it, after an extra round of deliberation due to some wording that surprised them, and at this point it's just a question of getting the VP's signature onto the right PDF. Most likely a question of days.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5587533241
Lovely work. I really am puzzled that the test suite was green after my work, before yours @chibenwa
Thanks!
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6289508026
The NDA has been signed (difficult due to travel) and should be sent to the ASF secretary once the timezones have cooperated.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-5574300852
Please address your comments @Arsnael
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3958948047
##########
mdn/src/main/java/org/apache/james/mdn/MDN.java:
##########
@@ -193,6 +193,19 @@ public static Optional<MDNReport> extractMDNReport(List<Entity> entities) {
});
}
+ /**
+ * RFC 6533 defines {@code message/global-disposition-notification} as UTF-8;
+ * no charset parameter is defined for it, so senders legitimately omit one and
+ * mime4j then falls back to us-ascii. Only the RFC 3798 form honours the
+ * declared charset.
+ */
+ private static String reportCharset(Entity entity) {
Review Comment:
Just a comment. The code is correct, I think.
There a chance that an RFC will appear sometime in 2027/8 that deprecates message/global and says to use message/rfc822 for everything. Ditto text/globalheaders or whatever it was.
I think *generating* message/global is good, for now, but on the *parse* side I might lean towards accepting UTF8 in message/rfc822 already. Not 100% sure. I might be strict there too, it depends on the code.
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "arnt (via GitHub)" <gi...@apache.org>.
arnt commented on code in PR #3130:
URL: https://github.com/apache/james-project/pull/3130#discussion_r3959466388
##########
mdn/src/main/java/org/apache/james/mdn/MDN.java:
##########
@@ -193,6 +193,19 @@ public static Optional<MDNReport> extractMDNReport(List<Entity> entities) {
});
}
+ /**
+ * RFC 6533 defines {@code message/global-disposition-notification} as UTF-8;
+ * no charset parameter is defined for it, so senders legitimately omit one and
+ * mime4j then falls back to us-ascii. Only the RFC 3798 form honours the
+ * declared charset.
+ */
+ private static String reportCharset(Entity entity) {
Review Comment:
Yes.
I think my brain has found an opinion: at this point it's best to always follow RFC 6533 when generating, and mostly when parsing (unless that's too complicated and requires too much code).
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
Re: [PR] Parse rfc6532 addresses [james-project]
Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on PR #3130:
URL: https://github.com/apache/james-project/pull/3130#issuecomment-6469888571
Great!
Thanks for the notofcation, and see you at Fosdem
--
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-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org