chibenwa commented on code in PR #2460:
URL: https://github.com/apache/james-project/pull/2460#discussion_r1873313835


##########
server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remote/delivery/MailDelivrerToHost.java:
##########
@@ -123,17 +130,23 @@ public ExecutionResult tryDeliveryToHost(Mail mail, 
Collection<InternetAddress>
         try {
             transport = (SMTPTransport) 
session.getTransport(outgoingMailServer);
             transport.setLocalHost(props.getProperty(inContext(session, 
"mail.smtp.localhost"), configuration.getHeloNameProvider().getHeloName()));
+            if (isTlsRequired(mail)) {
+                transport.setStartTLS(true);

Review Comment:
   2 remarks:
    - If the transport layer is already configured with SSL there's no point 
setting SSL. That's the case EG relaying to a secure mail gateway other the 
internet.
    - If the receiver server do not support startTLS this need to throw.



-- 
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-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to