Email certs stopped working after renewal


#1

Hi, I have a number of domains on my certificate, including 3x5.co. I checked my mail using mail.3x5.co 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 3x5.co is in the cert, it’s looking for mail.3x5.co.

I don’t remember this ever being in the cert. Still, I expanded the cert to include mail.3x5.co, and just associated it with 3x5.co-le-ssl.conf. 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 mail.3x5.co 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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
3x5.co

I ran this command:
sudo certbot --expand -d 3x5.co,mail.3x5.co

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):
Apache2

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

My hosting provider, if applicable, is:
Linode

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

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


#2

Hi @3x5,

Postfix is using the new cert and it includes the domain mail.3x5.co:

echo | openssl s_client -starttls smtp -connect mail.3x5.co:25 2>/dev/null | openssl x509 -noout -text | grep -Ei '(DNS:|after)'
Not After : Sep  5 14:20:54 2018 GMT
DNS:3x5.co, DNS:accessmiller.org, DNS:cdm.mpn.co, DNS:ceiseldds.com, DNS:dav.mpn.co, DNS:dev.mpn.co, DNS:goldberglicensing.com, DNS:hoyne.stonesoupcoop.org, DNS:keiser.mpn.co, DNS:leland.stonesoupcoop.org, DNS:mail.3x5.co, DNS:mail.morgannunan.com, DNS:mail.mpn.co, DNS:mail.primalartifice.com, DNS:mail.stonesoupcoop.org, DNS:morgannunan.com, DNS:mpn.co, DNS:primalartifice.com, DNS:rss.3x5.co, DNS:sheridan.stonesoupcoop.org, DNS:stonesoupcoop.org, DNS:thisisrhymesandreasons.com, DNS:www.3x5.co, DNS:www.accessmiller.org, DNS:www.ceiseldds.com, DNS:www.goldberglicensing.com, DNS:www.morgannunan.com, DNS:www.mpn.co, DNS:www.primalartifice.com, DNS:www.stonesoupcoop.org, DNS:www.thisisrhymesandreasons.com

But Dovecot is using your previous cert and it doesn’t include mail.3x5.co:

echo | openssl s_client -connect mail.3x5.co:993 -servername 3x5.co 2>/dev/null | openssl x509 -noout -text | grep -Ei '(DNS:|after)'
Not After : Aug 20 16:36:43 2018 GMT
DNS:3x5.co, DNS:accessmiller.org, DNS:cdm.mpn.co, DNS:ceiseldds.com, DNS:dav.mpn.co, DNS:dev.mpn.co, DNS:goldberglicensing.com, DNS:hoyne.stonesoupcoop.org, DNS:keiser.mpn.co, DNS:leland.stonesoupcoop.org, DNS:morgannunan.com, DNS:mpn.co, DNS:primalartifice.com, DNS:rss.3x5.co, DNS:sheridan.stonesoupcoop.org, DNS:stonesoupcoop.org, DNS:thisisrhymesandreasons.com, DNS:www.3x5.co, DNS:www.accessmiller.org, DNS:www.ceiseldds.com, DNS:www.goldberglicensing.com, DNS:www.morgannunan.com, DNS:www.mpn.co, DNS:www.primalartifice.com, DNS:www.stonesoupcoop.org, DNS:www.thisisrhymesandreasons.com 

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

Cheers,
sahsanu


#3

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.


#4

@3x5, right now Dovecot is serving the same certificate as Postfix so it is covering mail.3x5.co 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.


#5

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.


#6

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


#7

Both incoming and outgoing mail servers are mail.3x5.co.

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


#8

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.


#9

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