Zimbra Qualys A+: 3 Proven Fixes for an SSL Labs A+
In 2017 I hardened our Zimbra servers until the Qualys SSL Labs test gave them an A+. This post keeps those Zimbra Qualys A+ steps, then checks them against 2026: the cipher list, the HSTS header and the Diffie-Hellman file. The short version: the old cipher list is now Zimbra's own default, TLS 1.0 and 1.1 alone cap the grade at B, and the A+ comes from one header. Each Zimbra Qualys claim below was tested with a grading scanner.
Lab note: Zimbra is not installed for this test. Zimbra's web proxy is nginx, so the lab runs nginx 1.26.3 with OpenSSL 3.5.7 in a debian:13 container, a private CA for the certificate, and testssl 3.2.1, whose rating follows the "SSL Server Rating Guide" that Qualys SSL Labs publishes. It is marked experimental and is not the Qualys service itself, but it applies the same caps (TLS 1.0/1.1, HSTS). The Zimbra attribute names and defaults come from Zimbra's attribute file zimbra-attrs.xml and the Zimbra commands from my 2017 servers.
Contents
- What the Zimbra Qualys A+ grade checks
- Zimbra with the proxy: tune the cipher list
- Zimbra Qualys A+ test 1: the 2017 protocols cap the grade at B
- Zimbra Qualys A+ test 2: HSTS turns A into A+
- Zimbra Qualys A+ test 3: a stricter cipher list
- Zimbra without the proxy: Jetty settings
- Zimbra Qualys A+ checklist
What the Zimbra Qualys A+ grade checks
The Zimbra Qualys result is not magic. SSL Labs scores three areas (protocol support, key exchange, cipher strength) and then applies caps. The caps decide the letter for most mail servers. Two of them matter for Zimbra: offering TLS 1.0 or 1.1 caps the grade at B, and an A becomes A+ only when the server sends a Strict-Transport-Security (HSTS) header. The online test only works on a public host name: SSL Labs Server Test. For internal servers, testssl gives the same kind of rating from the command line.
Zimbra with the proxy: tune the cipher list
On a Zimbra install with the proxy (mailbox, proxy, MTA and LDAP), the proxy terminates HTTPS. In 2017 I set its cipher list as the zimbra user and restarted the proxy:
zmprov mcf zimbraReverseProxySSLCiphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128:AES256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4'
zmproxyctl restart
Before you copy it for your own Zimbra Qualys test, check what your server already has with zmprov gcf zimbraReverseProxySSLCiphers. The current zimbra-attrs.xml lists almost exactly this string as the default value of zimbraReverseProxySSLCiphers, plus TLS_AES_256_GCM_SHA384. On a recent release the command changes nothing.
The string is long but not strict. OpenSSL 3.5 expands it to 80 cipher suites, 42 of them CBC, and it still includes suites without forward secrecy (Kx=RSA):
$ openssl ciphers -v "$OLD" | wc -l
80
$ openssl ciphers -v "$OLD" | grep -c -v -E "GCM|CHACHA|CCM" # CBC suites
42
$ openssl ciphers -v "$OLD" | grep "Kx=RSA " | head -4
AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD
AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD
AES128-CCM TLSv1.2 Kx=RSA Au=RSA Enc=AESCCM(128) Mac=AEAD
AES128-CCM8 TLSv1.2 Kx=RSA Au=RSA Enc=AESCCM8(128) Mac=AEAD
That does not stop an A+, as the tests below show, but the scanner flags it: "Obsoleted CBC ciphers (AES, ARIA etc.) offered" and "LUCKY13 ... potentially VULNERABLE, uses cipher block chaining (CBC) ciphers".
Zimbra Qualys A+ test 1: the 2017 protocols cap the grade at B
In 2017 servers still offered TLS 1.0 and 1.1. With the cipher string above and ssl_protocols TLSv1 TLSv1.1 TLSv1.2 plus HSTS, the result is B. (OpenSSL 3 refuses TLS 1.0 at its default security level, so the lab had to add @SECLEVEL=0 to the cipher string to reproduce an old server.)
$ testssl --add-ca ca.crt https://mail.example.test # old ciphers, TLS 1.0-1.2, HSTS
TLS 1 offered (deprecated)
TLS 1.1 offered (deprecated)
TLS 1.2 offered (OK)
TLS 1.3 not offered and downgraded to a weaker protocol
Strict Transport Security 365 days=31536000 s, just this domain
Final Score 91
Overall Grade B
Grade cap reasons Grade capped to B. TLS 1.1 offered
The score of 91 would be an A; the cap makes it B, which is why so many Zimbra Qualys reports stop there. On Zimbra the proxy protocols live in zimbraReverseProxySSLProtocols, whose default in the attribute file is TLSv1.2 and TLSv1.3. If an old install still lists TLSv1 or TLSv1.1, remove them as the zimbra user:
zmprov gcf zimbraReverseProxySSLProtocols
zmprov mcf -zimbraReverseProxySSLProtocols TLSv1 -zimbraReverseProxySSLProtocols TLSv1.1
zmproxyctl restart
Zimbra Qualys A+ test 2: HSTS turns A into A+
Same cipher string, TLS 1.2 and 1.3 only. Without HSTS the grade stops at A; with the header it is A+:
$ testssl --add-ca ca.crt https://mail.example.test # old ciphers, TLS 1.2+1.3, no HSTS
TLS 1.2 offered (OK)
TLS 1.3 offered (OK): final
Strict Transport Security not offered
Final Score 93
Overall Grade A
Grade cap reasons Grade capped to A. HSTS is not offered
$ testssl --add-ca ca.crt https://mail.example.test # old ciphers, TLS 1.2+1.3, HSTS
Strict Transport Security 365 days=31536000 s, just this domain
Final Score 93
Overall Grade A+

In 2017 I added the header by editing two proxy templates, nginx.conf.web.https.default.template and nginx.conf.web.https.template in /opt/zimbra/conf/nginx/templates/, with this line in the server { } block:
add_header Strict-Transport-Security "max-age=31536000";
Template edits can be lost when Zimbra is upgraded. The current attribute file has zimbraReverseProxyResponseHeaders, described as custom response headers added by the proxy, "for example, can be used to add a HSTS header", where the value "MUST be the entire header line". It is marked since="8.7.0,9.0.0", so check that zmprov desc -a zimbraReverseProxyResponseHeaders knows it on your version before using:
zmprov mcf +zimbraReverseProxyResponseHeaders "Strict-Transport-Security: max-age=31536000"
zmproxyctl restart
Then confirm the header from any client:
$ curl -sI --cacert ca.crt https://mail.example.test/ | grep -i strict
Strict-Transport-Security: max-age=31536000
HSTS tells browsers to refuse plain HTTP for a year. Only enable it once HTTPS works for every name users type, and add includeSubDomains only if every subdomain has a valid certificate.
Zimbra Qualys A+ test 3: a stricter cipher list
An A+ is not the end of a Zimbra Qualys review. To also clear the CBC and LUCKY13 warnings, allow only ECDHE suites with AEAD encryption. The grade stays A+ and the warnings disappear:
$ testssl --add-ca ca.crt https://mail.example.test # ECDHE AEAD only, TLS 1.2+1.3, HSTS
Obsoleted CBC ciphers (AES, ARIA etc.) not offered
Strong encryption (AEAD ciphers) with no FS not offered
Forward Secrecy strong encryption (AEAD ciphers) offered (OK)
LUCKY13 (CVE-2013-0169), experimental not vulnerable (OK)
Final Score 93
Overall Grade A+
The list used: ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305. Very old mail clients that only speak CBC suites will stop connecting, so test the oldest clients your users still have before you switch.
The 2017 post also generated a 2048-bit dhparam.pem and added ssl_dhparam to the templates. None of the A+ results above used a DH parameter file; with TLS 1.3 and ECDHE suites the DHE suites are not needed. Zimbra now has a zimbraSSLDHParam attribute ("PEM formatted DH parameters for SSL") if you keep DHE suites.
Zimbra without the proxy: Jetty settings
Without the proxy, Jetty in the mailbox server serves HTTPS. In 2017 I excluded weak suites one by one with zmprov mcf +zimbraSSLExcludeCipherSuites ... (about 20 names such as SSL_RSA_WITH_RC4_128_MD5 and TLS_RSA_WITH_AES_128_CBC_SHA) and ran zmmailboxdctl restart. The current defaults use regular expressions that cover that whole list:
zimbraSSLExcludeCipherSuites .*_RC4_.*
zimbraSSLExcludeCipherSuites ^.*_(MD5|SHA|SHA1)$
zimbraSSLExcludeCipherSuites ^TLS_RSA_.*
and zimbraMailboxdSSLProtocols defaults to TLSv1.2. Check both with zmprov gcf before adding entries. For HSTS on Jetty I added a HeaderPatternRule to /opt/zimbra/jetty/etc/jetty.xml.in:
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="name">Strict-Transport-Security</Set>
<Set name="value">max-age=15768000; includeSubDomains</Set>
</New>
</Arg>
</Call>
This Jetty part of the Zimbra Qualys setup was not re-tested in the lab. Keep a copy of the edited file, because it is a template that upgrades can replace.
Zimbra Qualys A+ checklist
- Proxy protocols: only TLSv1.2 and TLSv1.3 in
zimbraReverseProxySSLProtocols(TLS 1.0/1.1 = B). - HSTS on the proxy:
zimbraReverseProxyResponseHeadersor the template line (no HSTS = A). - Ciphers: the default list reaches A+; an ECDHE+AEAD list also removes the CBC warnings.
- Jetty without proxy: check the regex defaults of
zimbraSSLExcludeCipherSuitesandzimbraMailboxdSSLProtocols. - Restart the service (
zmproxyctl restartorzmmailboxdctl restart) and re-run the Zimbra Qualys test.
If you are building the proxy tier from scratch, see how to install Zimbra proxy. The full scoring rules for a Zimbra Qualys A+ are in the SSL Labs SSL Server Rating Guide.
Comments
Post a Comment