Dovecot-cert.sh

From Organic Design wiki
Revision as of 06:56, 8 May 2009 by Nad (talk | contribs) (creating dovecot certs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This script creates a self-signed certificate for the Dovecot IMAP server. It will replace any pre-existing Dovecot certificate. Run the script and enter the mail server domain name for the "Common Name" field.

#!/bin/sh
openssl genrsa -out /etc/ssl/private/dovecot.pem 1024
openssl req -new -key /etc/ssl/private/dovecot.pem -out /tmp/csr
openssl x509 -in /tmp/csr -out /etc/ssl/certs/dovecot.pem -req -signkey /etc/ssl/private/dovecot.pem -days 999