SMTP and TLS

Our corporate SMTP server requires TLS1.2. I expected that all that would be required is to tick the TLS box for mail in Lucee Administrator. It didn’t work. As an interim solution I used the local Windows SMTP Service as a relay. On revisiting this, AI suggested adding the following Java Options to the Tomcat settings.

-Dmail.smtp.ssl.protocols=TLSv1.2
-Dmail.smtp.starttls.enable=true
-Dmail.smtp.starttls.required=true

The TLS box now works. Is this the correct procedure to get Lucee mail to use TLS1.2 ?

Lucee 6.2.2.91, Java 21.0.8, Tomcat 11.0.11, Windows 2022.

1 Like

Thanks #watching thread

Yes, I think that is the correct way to get Lucee mail to use TLS 1.2.

The problem is currently Lucee announces all the versions it supports, given it’s 2025, i think we should consider not announcing by default versions less than 1.2, and perhaps exposing via the smtp settings the protocol

1 Like

Allow specifying tlsProtocol(s) in mail server definitions

https://luceeserver.atlassian.net/browse/LDEV-5892

default to only TLS v1.2 and newer for SMTP

https://luceeserver.atlassian.net/browse/LDEV-5893

Yes, adding those Java/Tomcat options is the right approach when your SMTP service provider requires TLS 1.2, since Lucee’s checkbox alone doesn’t always enforce the protocol version. If you’re looking to simplify this setup, switching to a dedicated SMTP service provider like DigitalAka™ can handle TLS negotiation automatically without manual JVM flags. That said, the fix you’ve applied is technically sound and a commonly recommended workaround until Lucee exposes protocol selection natively in its mail settings.

I have updated Lucee 6.2, 7.0 and 7.1 to respect the jvm supported mail protocols (which skips the older deprecated ones) , as long as you are using a recent jvm, it will automatically default now to tls 1.2 and 1.3

existing overrides / workarounds still work

https://luceeserver.atlassian.net/browse/LDEV-5893