Page 1 of 1

Dovecot certificates

Posted: 06 Oct 2008, 16:11
by Binkem
When connecting to the mail server i get a message saying "certificate belongs to "BUBBA.LOCALDOMAIN" i want to make a certificate that belongs to www.mydomain.com instead so i won't get this message ewvery time i connect. Can someone point out how to do this. I've seen some hints here and there, but i haven't seen a good howto yet.

Martijn

Posted: 07 Oct 2008, 03:39
by Krister
Run as root (where SE is for Sweden)

Code: Select all

openssl req -x509 -nodes -days 3650 -subj '/C=SE/L=City/O=MyName/CN=www.mydomain.com' -newkey rsa:1024 -keyout mydomain_key.pem -out mydomain_cert.pem
and then

Code: Select all

cp mydomain_key.pem /etc/ssl/private
cp mydomain_cert.pem /etc/ssl/certs
Now edit /etc/dovecot/dovecot.conf to this:

#ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_cert_file = /etc/ssl/certs/mydomain_cert.pem
#ssl_key_file = /etc/ssl/private/dovecot.pem
ssl_key_file = /etc/ssl/private/mydomain_key.pem


Finaly run

Code: Select all

/etc/init.d/dovecot restart

Posted: 07 Oct 2008, 16:16
by Binkem
OK works perfectly :D

thanks

Posted: 23 Jan 2009, 16:41
by max
How do you handle multiple domains?