Email certs stopped working after renewal


Hi, I have a number of domains on my certificate, including I checked my mail using I added my cert to postfix and dovecot, and everything worked fine.

Then, when I renewed, the cert stopped working for my email, on my laptop and phone. It says the certificate is for the wrong domain. Even though is in the cert, it’s looking for

I don’t remember this ever being in the cert. Still, I expanded the cert to include, and just associated it with This isn’t totally correct, because there is no vhost for this subdomain, which is obviously a mail server.

Anyway, this didn’t solve the problem. When I go to my email on my phone, it still says the cert is wrong and doesn’t see in the list – even though when I run certbot certificates on the server, this domain does come up for this cert.

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
sudo certbot --expand -d,

It produced this output:
We were unable to set up enhancement redirect for your server,
however, we successfully installed your certificate.

My web server is (include version):

The operating system my web server runs on is (include version):
Ubuntu 14.04

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


Hi @3x5,

Postfix is using the new cert and it includes the domain

echo | openssl s_client -starttls smtp -connect 2>/dev/null | openssl x509 -noout -text | grep -Ei '(DNS:|after)'
Not After : Sep  5 14:20:54 2018 GMT,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

But Dovecot is using your previous cert and it doesn’t include

echo | openssl s_client -connect -servername 2>/dev/null | openssl x509 -noout -text | grep -Ei '(DNS:|after)'
Not After : Aug 20 16:36:43 2018 GMT,,,,,,,,,,,,,,,,,,,,,,,,, 

Are you sure Postfix and Dovecot are using the same path to your certificate?, did you reload/restart Dovecot?.



Thanks for the reply.

This seems to have helped somewhat, because I downloaded a second mail app for my phone, and when I set up my mailbox, it will now accept the mail settings.

However, it rejects the outgoing settings. Furthermore, my stock email app still won’t read my email. It says ‘no connection’. It was working fine before, so I’m not sure why it’s not working now.


@3x5, right now Dovecot is serving the same certificate as Postfix so it is covering domain and if you have configured your mail app to use this domain to connect to your server it should work fine, if it doesn’t work seems the problem is in the app you are using.


Thanks again for the reply, but I don’t see how that can be possible, as two different apps have problems, and both worked perfectly before I renewed my cert. Immediately after renewal, they stopped working properly.


@3x5, how are you configuring the smtp and imap server in the app?


Both incoming and outgoing mail servers are

incoming is SSL/TLS, port 993. Outgoing is STARTTLS, port 587.


Hi @sahsanu, thanks for your help. I can access my emails by deleting the account, and recreating it.

Even editing the details on the existing account ended in an error. So you were correct, it’s some quirk with the app itself. Thanks again.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.