I have two separate servers, one for self-hosted mail (with Mail-in-a-box) and one for my web server (with an application that uses PHPMailer), both running Ubuntu 16.04 and using LE. Like many others, I got bitten when the old DST Root CA X3 certificate expired last month. Specifically, my mail server began rejecting outgoing mail from the client - in this case my web server. I found the postfix error in my mail logs:
warning: TLS library problem: error:14094415:SSL routines:ssl3_read_bytes:sslv3 alert certificate expired
and after some googling eventually traced it back to the root cert expiring (see Let's Encrypt's Root Certificate is expiring!).
I tried a few things, including:
- Updating the version of openssl on my web server (from 1.0.2g to 1.1.1k)
- Checking the version of openssl on my mail server (it's also running 1.1.1)
- Removing the old DST certificate from my web server's
/etc/ca-certificates.conf
list and rebuilding withdpkg-reconfigure -fnoninteractive ca-certificates
andupdate-ca-certificates
Now I get a slightly different error from postfix on my mail server:
TLS library problem: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca
.
I tried running the following command on my web server:
openssl s_client -connect mymailserver.com:587 -servername mymailserver.com -starttls smtp
And I get the following:
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = mymailserver.com
verify return:1
---
Certificate chain
0 s:CN = mymailserver.com
i:C = US, O = Let's Encrypt, CN = R3
1 s:C = US, O = Let's Encrypt, CN = R3
i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
2 s:C = US, O = Internet Security Research Group, CN = ISRG Root X1
i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Is this a problem on my web server, mail server, or both? What else do I need to do to fix it?