Full Mail Server Solution w/ Virtual Domains & Users - Page 13 (Secure Client + Server Certificates)
C. CA Signed client and server certificatesIf you want to use CA-signed client certificates, you will need to take further steps, both in Postfix and in Dovecot to make this work. If you want the user names to be taken from the certificate itself, you currently must set the common name to the user name, for example user@example.com, which has been used in this document. 1. Telling Postfix about the CertificatesIn Postfix, you can either use a directory of CA certificates, or a composite file with all the certificates concatenated together. We're going to use the concatinated form, since that is what Dovecot is expecting.
# postconf -e 'smtpd_tls_CAfile = /etc/ssl/example.com/ca/all.pem' 2. Telling Dovecot about the CertificatesIn Dovecot, you must have the CRL together with the certificate for the authentication to work. The directives themselves are the following. /etc/dovecot/dovecot.conf [...] NOTE: You will also need to change the password_query to the commented one in /etc/dovecot/dovecot-sql.conf Warning: If you are running Dovecot release candidate 28 or older, the server will not send out the list of accepted CA names, which could make clients with multiple client certificates unable to connect. Please upgrade or install this patch. 3. Concatinating filesIf you have several CAs and CRLs, it could be difficult to concatenate them each time, so a small script was created which will do that for you. Just stick it in your /etc/ssl/example.com/ca/ directory and run it. It will create an all.pem with all certificates and all CRLs. make.sh: #!/bin/bash 4. Postfix TLS settingsLike I said before, there are some settings in Postfix that need to be changed as well, so let's modify main.cf:
# postconf -e 'smtpd_tls_ask_ccert = yes' Now you should have an enterprise ready email server with client certificates.
|

![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)


Recent comments
3 hours 43 min ago
14 hours 56 min ago
20 hours 34 min ago
1 day 15 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 20 hours ago
1 day 21 hours ago
2 days 13 hours ago
2 days 14 hours ago