Record of some of the computer tech I deal with so that it's documented at least somewhere.

Tuesday 24 February 2009

Courier SSL cert

When courier makes the self-cert on install, it uses a template that has localhost as the hostname, not very useful when you connect from another machine!

/etc/courier/imapd.cnf

change the CN field from localhost to whatever (output below)
ed /etc/courier/imapd.cnf
/localhost
s/localhost/slap
/emailAddress
s/=.*/=GETLOSTUSPAMMINGCUNT0x -- change this :>
w
q

cd /usr/lib/courier/
rm *pem
./mkimapdcert
cp *pem /etc/courier/
/etc/init.d/courier-imap-ssl restart

then you're done

-----
RANDFILE = /usr/lib/courier/imapd.rand

[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no

[ req_dn ]
C=UK
ST=NG
L=Nottingham
O=Courier Mail Server
OU=Automatically-generated IMAP SSL key
CN=slap
emailAddress=GETLOSTUSPAMMINGCUNT0x

[ cert_type ]
nsCertType = server
--------

No comments: