vttranlina commented on a change in pull request #810:
URL: https://github.com/apache/james-project/pull/810#discussion_r778658662



##########
File path: 
protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
##########
@@ -465,9 +508,19 @@ private Response doUnknownAuth(SMTPSession session, String 
authType, String init
     @Override
     public List<String> getImplementedEsmtpFeatures(SMTPSession session) {
         if (session.isAuthAnnounced()) {
+            ImmutableList.Builder<String> authTypesBuilder = 
ImmutableList.builder();
             if (session.getConfiguration().isPlainAuthEnabled()) {
-                return ESMTP_FEATURES;
+                authTypesBuilder.add(AUTH_TYPE_LOGIN, AUTH_TYPE_PLAIN);
+            }
+            if (session.getConfiguration().saslConfiguration().isPresent()) {

Review comment:
       IMO `session.getConfiguration().enableOAuth()`  is better. 
   Example: 
`org.apache.james.smtpserver.SMTPSaslTest#oauthWithNoTLSConnectShouldFail` 
   




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to