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 6d2e138119a54b354314586b94e6aecbe7be79a1
Author: Tran Tien Duc <[email protected]>
AuthorDate: Thu Jan 30 13:58:19 2020 +0700

    JAMES-3016 Drop allow8bitmime option in remote delivery
---
 CHANGELOG.md                                           |  6 +++++-
 .../mailets/RemoteDeliveryDKIMIntegrationTest.java     | 18 ++++++++----------
 .../remote/delivery/RemoteDeliveryConfiguration.java   |  3 ---
 .../delivery/RemoteDeliveryConfigurationTest.java      |  3 ---
 4 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5df9c24..205ce27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,7 +54,11 @@ of tasks being currently executed.
   - MailboxQuotaFixed matcher. Please use IsOverQuota instead.
 - UsersFileRepository, which was marked as deprecated for years
   - We accordingly removed deprecated methods within 
UsersRepositoryManagementMBean exposed over JMX (unsetAlias, getAlias, 
unsetForwardAddress, getForwardAddress). RecipientRewriteTables should be used 
instead.
-
+- JAMES-3016 RemoteDelivery now doesn't enable `allow8bitmime` property by 
default. 
+This parameter could cause body content alteration leading to DKIM invalid 
DKIM signatures to be positioned. 
+Thanks to Sergey B. for the report. 
+More details about the property is at [java mail 
doc](https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html)
 
+ 
 ### Third party softwares
  - The distributed James server product (relying on Guice, Cassandra, 
ElasticSearch, RabbitMQ and optionally Swift) now needs at least RabbitMQ 3.8.
  - Tika prior 1.22 is subject to multiple CVEs. We recommend the upgrade.
diff --git 
a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryDKIMIntegrationTest.java
 
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryDKIMIntegrationTest.java
index 3a991b0..3efb1ad 100644
--- 
a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryDKIMIntegrationTest.java
+++ 
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RemoteDeliveryDKIMIntegrationTest.java
@@ -144,7 +144,8 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
+                    .addProperty("mail.smtp.allow8bitmime", "true")))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
@@ -210,8 +211,7 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
-                    .addProperty("mail.smtp.allow8bitmime", "false")))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
@@ -244,8 +244,7 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
-                    .addProperty("mail.smtp.allow8bitmime", "false")))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
@@ -280,7 +279,8 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
+                    .addProperty("mail.smtp.allow8bitmime", "true")))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
@@ -346,8 +346,7 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
-                    .addProperty("mail.smtp.allow8bitmime", "false")))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
@@ -380,8 +379,7 @@ public class RemoteDeliveryDKIMIntegrationTest {
             .withBase(SMTP_ONLY_MODULE)
             .withOverrides(binder -> 
binder.bind(DNSService.class).toInstance(inMemoryDNSService))
             
.withMailetContainer(TemporaryJamesServer.SIMPLE_MAILET_CONTAINER_CONFIGURATION
-                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()
-                    .addProperty("mail.smtp.allow8bitmime", "false")))
+                
.putProcessor(directResolutionTransport(MailetConfiguration.remoteDeliveryBuilder()))
                 .putProcessor(CommonProcessors.bounces()))
             .build(temporaryFolder.newFolder());
 
diff --git 
a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfiguration.java
 
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfiguration.java
index 7bf937f..fbe60fa 100644
--- 
a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfiguration.java
+++ 
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfiguration.java
@@ -213,9 +213,6 @@ public class RemoteDeliveryConfiguration {
         // Reactivated: javamail 1.3.2 should no more have problems with "250 
OK" messages
         // (WAS "false": Prevents problems encountered with 250 OK Messages)
         props.put("mail.smtp.ehlo", "true");
-        // By setting this property to true the transport is allowed to send 8 
bit data to the server (if it supports
-        // the 8bitmime extension).
-        props.setProperty("mail.smtp.allow8bitmime", "true");
         props.put("mail.smtp.timeout", String.valueOf(smtpTimeout));
         props.put("mail.smtp.connectiontimeout", 
String.valueOf(connectionTimeout));
         props.put("mail.smtp.sendpartial", String.valueOf(sendPartial));
diff --git 
a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfigurationTest.java
 
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfigurationTest.java
index 99abe13..cd70d4c 100644
--- 
a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfigurationTest.java
+++ 
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remote/delivery/RemoteDeliveryConfigurationTest.java
@@ -766,7 +766,6 @@ public class RemoteDeliveryConfigurationTest {
         assertThat(properties)
             .containsOnly(MapEntry.entry("mail.smtp.ssl.enable", "false"),
                 MapEntry.entry("mail.smtp.sendpartial", "false"),
-                MapEntry.entry("mail.smtp.allow8bitmime", "true"),
                 MapEntry.entry("mail.smtp.ehlo", "true"),
                 MapEntry.entry("mail.smtp.connectiontimeout", "60000"),
                 MapEntry.entry("mail.smtp.localhost", helo),
@@ -793,7 +792,6 @@ public class RemoteDeliveryConfigurationTest {
         assertThat(properties)
             .containsOnly(MapEntry.entry("mail.smtp.ssl.enable", "true"),
                 MapEntry.entry("mail.smtp.sendpartial", "true"),
-                MapEntry.entry("mail.smtp.allow8bitmime", "true"),
                 MapEntry.entry("mail.smtp.ehlo", "true"),
                 MapEntry.entry("mail.smtp.connectiontimeout", 
String.valueOf(connectionTimeout)),
                 MapEntry.entry("mail.smtp.localhost", helo),
@@ -823,7 +821,6 @@ public class RemoteDeliveryConfigurationTest {
         assertThat(properties)
             .containsOnly(MapEntry.entry("mail.smtp.ssl.enable", "true"),
                 MapEntry.entry("mail.smtp.sendpartial", "true"),
-                MapEntry.entry("mail.smtp.allow8bitmime", "true"),
                 MapEntry.entry("mail.smtp.ehlo", "true"),
                 MapEntry.entry("mail.smtp.connectiontimeout", 
String.valueOf(connectionTimeout)),
                 MapEntry.entry("mail.smtp.localhost", helo),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to