0

I have my public web site with EV SSL certificate.
I bought new server and configured postfix and dovecot for mail server.
Can I use my website's SSL certificate for postfix and dovecot for secure connection?
I have .crt and .key files.
Should I convert them into .pem?
They will be on the same domain.

2

Can I use my website's SSL certificate for postfix and dovecot for secure connection?

In general yes. But the names you use to access the mail servers need to be part of the certificate too. So if the certificate only covers www.example.com but you want to use mail.example.com then this will not work.

I have .crt and .key files. Should I convert them into .pem?

PEM is a file format. ".crt" and ".key" are just file names. These files are often in PEM format already but might also be an DER format. If it looks like pure text it is PEM already and no need to convert it. See Wikipedia: PEM for details.

6
  • I added paths of my certificates, but dovecot gives error: imap-login: Error: Failed to initialize SSL server context: Couldn't parse private SSL key: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt, error:0906A065:PEM routines:PEM>. What may be the problem? – it dev Mar 5 at 10:41
  • @itdev: Wrong format of key, i.e. likely not a PEM format. – Steffen Ullrich Mar 5 at 11:48
  • How can I convert my keys to right format? – it dev Mar 6 at 6:15
  • @itdev: All I know from your file is the name, not the content. Assuming that the keys are in DER format you could use something like openssl rsa -in file.key -inform DER -out key.pem -outform PEM. But again, I have no idea what your files actually contain. – Steffen Ullrich Mar 6 at 6:29
  • I will check your advice and tell it then. My keys are from my website's SSL certificate. That certificate is EV SSL. It uses 2048 bits for securing. All I know - is this. – it dev Mar 6 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.