Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL: Can I use the same SSL Certificate both for Web and Mail services on the same server?

Tags:

ssl

apache

smtp

My application performs ajax calls to a remote server that monitors incoming emails for multiple recipients and retrieves them if there are new ones. For security measure, I need to use HTTPS for the calls and also make the email retrieval secure.

My questions, as the title states, can I use the same SSL Certificate both for Web and Mail services on the same server having the same domain?

like image 946
Jhourlad Estrella Avatar asked Oct 21 '11 03:10

Jhourlad Estrella


2 Answers

Yes it is possible. The clients receiving the certificate will accept it, since the certificate they receive will match the domain name they are contacting.

If it is recommended?Well it would be better to deploy different certificate per interface, if it is possible.

like image 88
Cratylus Avatar answered Oct 13 '22 01:10

Cratylus


One my mail servers, I use the same VeriSign issued x509 certificate/private key for apache, postfix, and cyrus (for imaps/pop3s) and it works fine.

It's possible that some issued certs have fields that a particular mail server won't like, but unless it's something non-standard, I can't see the popular MTA's (like sendmail, postfix, qmail, etc.) choking on it.

You also have to make sure to convert your cert/key to the format the service expects it in. Apache, postfix, cyrus all work with PEM x509 and RSA private key.

like image 38
Jon Lin Avatar answered Oct 13 '22 00:10

Jon Lin