This is an automated email from the ASF dual-hosted git repository.
Arsnael 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 5cd303d6ca fix: format of SMTP AUTH ehlo response line
5cd303d6ca is described below
commit 5cd303d6cae66959796d042fdf028b4fcbc9366b
Author: Felix Auringer <[email protected]>
AuthorDate: Tue Sep 22 09:40:51 2026 +0200
fix: format of SMTP AUTH ehlo response line
RFC 5321 (https://www.rfc-editor.org/info/rfc5321/#section-4.1.1.1)
specifies that a space must follow after the keyword in an EHLO
response.
Hence, the correct format is `250-AUTH PLAIN LOGIN`.
James currently additionally sends `250-AUTH=PLAIN LOGIN`.
This seems to be for backward compatibility with clients that
are not RFC compliant. According to the postfix docs
(https://www.postfix.org/postconf.5.html#broken_sasl_auth_clients),
this applies to very old clients, so this should not be the
default behavior.
---
.../org/apache/james/smtp/scripts/data_starts_with_starttls.test | 1 -
.../resources/org/apache/james/smtp/scripts/data_with_starttls.test | 1 -
.../resources/org/apache/james/smtp/scripts/rcpt_with_starttls.test | 1 -
.../src/main/resources/org/apache/james/smtp/scripts/starttls.test | 1 -
.../org/apache/james/smtp/scripts/starttls_session_fixation.test | 1 -
.../org/apache/james/smtp/scripts/starttls_with_injection.test | 1 -
.../org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java | 3 +--
.../src/test/java/org/apache/james/smtpserver/SMTPServerTest.java | 5 -----
src/site/xdoc/server/monitor-logging.xml | 2 +-
9 files changed, 2 insertions(+), 14 deletions(-)
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_starts_with_starttls.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_starts_with_starttls.test
index 88c656f7db..fd1e4ce404 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_starts_with_starttls.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_starts_with_starttls.test
@@ -5,7 +5,6 @@ C: rcpt to:<[email protected]>
C: data
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_with_starttls.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_with_starttls.test
index c25db1be37..8fbf37c649 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_with_starttls.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/data_with_starttls.test
@@ -5,7 +5,6 @@ C: rcpt to:<[email protected]>
C: data
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/rcpt_with_starttls.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/rcpt_with_starttls.test
index 5b6de69b98..65ee517a86 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/rcpt_with_starttls.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/rcpt_with_starttls.test
@@ -5,7 +5,6 @@ C: rcpt to:<[email protected]>
C: data
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls.test
index d71186b47d..e8887f9ddd 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls.test
@@ -3,7 +3,6 @@ S: 220 mydomain.tld smtp
C: ehlo yopmail.com
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_session_fixation.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_session_fixation.test
index 2d1b1e562a..3c7dde9a46 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_session_fixation.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_session_fixation.test
@@ -3,7 +3,6 @@ S: 220 mydomain.tld smtp
C: ehlo yopmail.com
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_with_injection.test
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_with_injection.test
index 90068f635d..e5237c3975 100644
---
a/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_with_injection.test
+++
b/mpt/impl/smtp/core/src/main/resources/org/apache/james/smtp/scripts/starttls_with_injection.test
@@ -3,7 +3,6 @@ S: 220 mydomain.tld smtp
C: ehlo yopmail.com
S: 250.*
S: 250-AUTH LOGIN PLAIN
-S: 250-AUTH=LOGIN PLAIN
S: 250-PIPELINING
S: 250-ENHANCEDSTATUSCODES
S: 250-8BITMIME
diff --git
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
index 7d8fb2e6c7..336821884a 100644
---
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
+++
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
@@ -356,8 +356,7 @@ public class AuthCmdHandler
if (authTypes.isEmpty()) {
return Collections.emptyList();
}
- String joined = Joiner.on(AUTH_TYPES_DELIMITER).join(authTypes);
- return ImmutableList.of("AUTH " + joined, "AUTH=" + joined);
+ return ImmutableList.of("AUTH " +
Joiner.on(AUTH_TYPES_DELIMITER).join(authTypes));
}
return Collections.emptyList();
}
diff --git
a/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
b/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
index 5f27fd0193..af399106bf 100644
---
a/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
+++
b/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
@@ -1282,9 +1282,6 @@ public class SMTPServerTest {
assertThat(capabilitieslist.contains("AUTH LOGIN PLAIN"))
.as("anouncing auth required")
.isTrue();
- // is this required or just for compatibility?
- // assertTrue("anouncing auth required",
- // capabilitieslist.contains("AUTH=LOGIN PLAIN"));
String userName = USER_LOCALHOST;
String noexistUserName = "noexist_test_user_smtp";
@@ -1832,8 +1829,6 @@ public class SMTPServerTest {
assertThat(capabilitieslist.contains("AUTH LOGIN PLAIN"))
.as("anouncing auth required")
.isTrue();
- // is this required or just for compatibility? assertTrue("anouncing
- // auth required", capabilitieslist.contains("AUTH=LOGIN PLAIN"));
String userName = USER_LOCALHOST;
String sender = USER_LOCALHOST;
diff --git a/src/site/xdoc/server/monitor-logging.xml
b/src/site/xdoc/server/monitor-logging.xml
index 741bef425b..7202986049 100644
--- a/src/site/xdoc/server/monitor-logging.xml
+++ b/src/site/xdoc/server/monitor-logging.xml
@@ -162,7 +162,7 @@ INFO 16:42:22,977 | james.smtpserver | 167 Successfully
spooled mail Mail129190
DEBUG 17:23:42,297 | james.smtpserver | 262
org.apache.james.smtpserver.JamesWelcomeMessageHandler disconnect=false
DEBUG 17:23:46,091 | james.smtpserver | 262 Lookup command handler for
command: EHLO
-DEBUG 17:23:46,093 | james.smtpserver | 262
org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler: 250 [noname. Hello
test (fileserver [192.168.0.254]), AUTH LOGIN PLAIN, AUTH=LOGIN PLAIN,
PIPELINING, ENHANCEDSTATUSCODES, 8BITMIME]
+DEBUG 17:23:46,093 | james.smtpserver | 262
org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler: 250 [noname. Hello
test (fileserver [192.168.0.254]), AUTH LOGIN PLAIN, PIPELINING,
ENHANCEDSTATUSCODES, 8BITMIME]
DEBUG 17:23:46,098 | james.smtpserver | 262
org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler
disconnect=false
DEBUG 17:23:54,029 | james.smtpserver | 262 Lookup command handler for
command: MAIL
DEBUG 17:23:54,031 | james.smtpserver | 262
org.apache.james.smtpserver.JamesMailCmdHandler: 250 [2.1.0 Sender <> OK]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]