Ok, after better examination of the code the following simple change
will require the use of STARTTTLS when requiring the use of
authentication to send an email
For class
smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/AuthCmdHandler.java
Change method
public List<String> getImplementedEsmtpFeatures(SMTPSession session) {
if (session.isAuthSupported()) {
return ESMTP_FEATURES;
} else {
return Collections.EMPTY_LIST;
}
}
to
public List<String> getImplementedEsmtpFeatures(SMTPSession session) {
if (session.isAuthSupported() &&
(!session.isStartTLSSupported() || session.isTLSStarted())) {
return ESMTP_FEATURES;
} else {
return Collections.EMPTY_LIST;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]