Self-signed SSL certificate for dovecot

Ok, this is a purely selfish post. I have to do this rarely enough that every time I do, I have to look it up. I could put this somewhere, perhaps in my little bag of tricks called ‘you should remember this’. Unfortunately, I don’t have that bag, and I’ll never remember it. So, hopefully putting this here will give me one more place to forget, and just maybe someone else will find it useful too.

A handy little one-line command to generate cert and keys in PEM format that Dovecot will like:

 openssl req -x509 -nodes -days 3650 
  -subj '/C=CA/ST=QC/L=Montreal/O=Company Name/CN=server.name.com' 
  -newkey rsa:1024 -keyout new_key.pem -out new_cert.pem

And there you have it.

 

August 2007
S M T W T F S
« Jul   Sep »
 1234
567891011
12131415161718
19202122232425
262728293031  

You could make it -days 65
Then you would have to do it often enough to remember :-).

*
To prove you're a person (not a spam script), type the security word shown in the picture.

CAPTCHA