Getting the SSL to work with postfix and dovcot
I bought a positive SSL (COMODO) for my mailserver and added the files to the right location following the instructions in Linode Library.
My main.cf in postfix now has:
smtpdtlscertfile= /etc/ssl/localcerts/wwwdreamdare_org.crt
smtpdtlskey_file= /etc/ssl/localcerts/
smtpdtlsCAfile = /etc/ssl/localcerts/PositiveSSLCA2.crt
and 10-ssl.conf in dovcot has
sslcert = sslkey = www.dreamdare.org.key
ssl_ca =
But my mail client stil shows the not verified message. I have also restarted dovcot and postifix as well. What am i missing here? I'm running Ubuntu 12.04.
Thanks in advance,
Chris
13 Replies
@dreamdare:
Hi Guys,
I bought a positive SSL (COMODO) for my mailserver and added the files to the right location following the instructions in Linode Library.
My main.cf in postfix now has:
smtpdtlscertfile= /etc/ssl/localcerts/wwwdreamdare_org.crt
smtpdtlskey_file= /etc/ssl/localcerts/
www.dreamdare.org.key smtpdtlsCAfile = /etc/ssl/localcerts/PositiveSSLCA2.crt
and 10-ssl.conf in dovcot has
sslcert = sslkey = www.dreamdare.org.key
ssl_ca =
But my mail client stil shows the not verified message. I have also restarted dovcot and postifix as well. What am i missing here? I'm running Ubuntu 12.04.
Thanks in advance,
Chris
it seems that there is something wrong in the certificate.
who signed the certificate?
The signin request was generated by me and the certificate is a Comodo Positive SSL from cheapSSL. I've restarted the email client and no luck.
openssl s_client -connect host:port
What port is your mail client connecting to? You didn't mention if you were using POP or IMAP with dovecot.
Secure POP3 should be on 995 and secure IMAP should be on 993. Don't forget to change host:port to the right combination for your server.
So, you either need to add additional Subject Alternative Names for the all the names you use to refer to that server, or you need to change all of the places you refer to the server by name to use a name that's in Subject Alternative Names. At the moment the Subject Alternative Names in your certificate include only the bare domain and the www hostname.
-James
Edit: Forgot to mention the third option - a wildcard certificate would work as well since that covers every possible hostname under your domain.
@The Other Air Force:
You can try viewing the certificate using:
openssl s_client -connect host:port
What port is your mail client connecting to? You didn't mention if you were using POP or IMAP with dovecot.
Secure POP3 should be on 995 and secure IMAP should be on 993. Don't forget to change host:port to the right combination for your server.
I'm using IMAP and the port is 993.
@James: To use the Subject Alternative Names, would i have to generate another request and get another certificate or there is a way to fix this one?
-James
I noticed that in the CSR, it says: CN=
I use mail.dreamdare.org in my client, is this what causing the problem for this specific domain?
Thanks
* Generate a new CSR with mail.dreamdare.org in the SAN section and get it signed
Get a wildcard certificate for *.dreamdare.org (and a SAN of dreamdare.org)
Get a new certificate for mail.dreamdare.org
Tell your mail client that the server's name is www.dreamdare.org & edit your MX record to use www.dreamdare.org as well
Also, when I went digging a little deeper I noticed that you are not serving the intermediate (or chain) certificate that connects your certificate to the trusted root certificate which everyone has installed. After a little searching I wasn't able to find the intermediate certificate you need, but the company that signed your certificate should be able to provide it to you. Without that certificate, the verification chain is broken so your certificate cannot be validated.
-James
As for the root certificate, it's there, it's in another directory.
One last thing, could i add
Thanks again
You might want to remove the MX record you have pointing to mail.dreamdare.org now, though, as that name won't be able to be verified with the current certificate. Most systems sending you mail won't care since it's got a lower priority, but if your mail server starts dropping connections (or a non-compliant system decides to use the wrong MX record) mail may bounce due to the SSL/TLS verification issue that that name.
-James