Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Oct 09, 2013 4:55 am 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
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:

smtpd_tls_cert_file= /etc/ssl/localcerts/www_dreamdare_org.crt
smtpd_tls_key_file= /etc/ssl/localcerts/www.dreamdare.org.key
smtpd_tls_CAfile = /etc/ssl/localcerts/PositiveSSLCA2.crt

and 10-ssl.conf in dovcot has

ssl_cert = </etc/ssl/localcerts/www_dreamdare_org.crt
ssl_key = </etc/ssl/localcerts/www.dreamdare.org.key
ssl_ca = </etc/ssl/localcerts/PositiveSSLCA2.crt

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


Top
   
PostPosted: Mon Oct 14, 2013 7:54 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
dreamdare wrote:
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:

smtpd_tls_cert_file= /etc/ssl/localcerts/www_dreamdare_org.crt
smtpd_tls_key_file= /etc/ssl/localcerts/www.dreamdare.org.key
smtpd_tls_CAfile = /etc/ssl/localcerts/PositiveSSLCA2.crt

and 10-ssl.conf in dovcot has

ssl_cert = </etc/ssl/localcerts/www_dreamdare_org.crt
ssl_key = </etc/ssl/localcerts/www.dreamdare.org.key
ssl_ca = </etc/ssl/localcerts/PositiveSSLCA2.crt

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?


Top
   
PostPosted: Mon Oct 14, 2013 10:56 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
It's working fine for me, have you restarted your mail client?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Mon Oct 14, 2013 9:49 pm 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
Hi guys,

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.:(


Top
   
PostPosted: Tue Oct 15, 2013 12:09 am 
Offline
Senior Member

Joined: Tue Aug 02, 2011 2:45 pm
Posts: 55
You can try viewing the certificate using:

Code:
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.


Top
   
PostPosted: Tue Oct 15, 2013 12:20 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
For SSL and TLS to work with SMTP when mail is delivered to your server by another system, the name returned in the MX record needs to be in Subject or Subject Alternative Names of the certificate. Likewise, for clients (your local MUA which gets mail via POP3/IMAP and delivers mail you send via SMTP on your server) the name you specify in the MUA's configuration needs to match one of the names in the certificate.

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.


Top
   
PostPosted: Tue Oct 15, 2013 1:08 am 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
The Other Air Force wrote:
You can try viewing the certificate using:

Code:
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?


Top
   
PostPosted: Tue Oct 15, 2013 1:12 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
You'd need to generate a new CSR and have it signed by the issuer again. None of the information in a certificate can be changed without getting it signed again.

-James


Top
   
PostPosted: Tue Oct 15, 2013 1:17 am 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
I see. but how is it that i can't even get this one to work? for the domain which it was intended.

I noticed that in the CSR, it says: CN=www.dreamdare.org

I use mail.dreamdare.org in my client, is this what causing the problem for this specific domain?

Thanks :)


Top
   
PostPosted: Tue Oct 15, 2013 1:52 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
Yes, mismatched names will always cause a problem. Any of the following will fix that:

  • 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


Top
   
PostPosted: Tue Oct 15, 2013 2:12 am 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
Thanks James, I added www.dreamdare.org to the MX records and set the client to the same as it's working fine now without any warnings.
As for the root certificate, it's there, it's in another directory.

One last thing, could i add www.dreamdare.org as MX records to other domains and use this mailserver? For example, if i have a admin@domain.com with MX record of www.dreamdare.org priority 0, would it work without warnings?

Thanks again


Top
   
PostPosted: Tue Oct 15, 2013 2:33 am 
Offline
Linode Staff
User avatar

Joined: Sat Jun 21, 2003 2:21 pm
Posts: 160
Location: Absecon, NJ
Yes. You can use www.dreamdare.org as the MX of any domain you're willing to accept mail for. Unless you get another certificate, however, clients will also need to use www.dreamdare.org as the name for POP3/IMAP and SMTP servers for the certificate to be verified.

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


Top
   
PostPosted: Tue Oct 15, 2013 4:25 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
The cert is also valid for dreamdare.org so they can use it without the www. Just a note.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Wed Oct 16, 2013 12:17 am 
Offline
Senior Newbie

Joined: Wed Oct 09, 2013 4:50 am
Posts: 6
Thanks guys, I really appreciate the help. All is good now:)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group