Install courier-imap-4.4.1-r1, which installs default imapd.cnf and pop3d.cnf files in /etc/courier-imap. Run mkimapdcert or mkpop3dcert to generate certificates, and they fail as follows: /etc/courier-imap# mkimapdcert imapd.cnf Generating a 512 bit RSA private key ...........++++++++++++ .++++++++++++ writing new private key to '/etc/courier-imap/imapd.pem' ----- unable to find 'distinguished_name' in config problems making Certificate Request 6121:error:0E06D06C:configuration file routines:NCONF_get_string:no value:conf_lib.c:329:group=req name=distinguished_name /etc/courier-imap# mkpop3dcert Generating a 512 bit RSA private key .......++++++++++++ ..................++++++++++++ writing new private key to '/etc/courier-imap/pop3d.pem' ----- unable to find 'distinguished_name' in config problems making Certificate Request 6129:error:0E06D06C:configuration file routines:NCONF_get_string:no value:conf_lib.c:329:group=req name=distinguished_name This appears to be due to a change in the format of the supplied .cnf files sometime after courier-imap-4.1.2-r1. Reproducible: Always Steps to Reproduce: 1. emerge courier-imap-4.4.1-r1 2. run mkimapdcert and mkpop3dcert
Any idea what needs to be changed for the certificates to be generated?
(In reply to comment #1) > Any idea what needs to be changed for the certificates to be generated? > Found it... here's an example that works: [ req ] default_bits = 1024 encrypt_key = yes distinguished_name = req_dn x509_extensions = cert_type prompt = no [ req_dn ] C=UK ST=Hampshire L=Southampton O=Courier Mail Server OU=Automatically-generated IMAP SSL key CN=drserver emailAddress=xxx@gmail.com [ cert_type ] nsCertType = server
(In reply to comment #2) > (In reply to comment #1) > > Any idea what needs to be changed for the certificates to be generated? > > > > Found it... here's an example that works: > [ req ] > default_bits = 1024 > encrypt_key = yes > distinguished_name = req_dn > x509_extensions = cert_type > prompt = no > > [ req_dn ] > C=UK > ST=Hampshire > L=Southampton > O=Courier Mail Server > OU=Automatically-generated IMAP SSL key > CN=drserver > emailAddress=xxx@gmail.com > > [ cert_type ] > nsCertType = server > Yes, that format worked for me, too. It's the format that was used previously in older versions. So it appears that 4.4.1 should leave the old format alone and not change it to something else.
(In reply to comment #3) Same here. This fixed the problem.