This documentation is for Dovecot v1.x, see wiki2 for v2.x documentation.

Setting SSL certificate details

OPENSSL=openssl
SSLDIR=/etc/pki/dovecot
OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf

(if you don't want your certificate to expire in 365 days, increase the number in the $OPENSSL command at the bottom of the file)