## ## SSL settings ## ## Version 2.2.x (AR14759611) # -------------------------------------------------------------------- # *** Please read this section before modifying this file *** # # Several of the keys and values within this file are modified by # Apple's Server Admin application. Each key that is automatically # modified by the Server Admin app is identified with a comment # preceding the key with this note: # # Note: This key is managed by Server Admin. See above before making changes # # -------------------------------------------------------------------- # SSL/TLS support: yes, no, required. # Note: This key is managed by Server Admin. See above before making changes ssl = required # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before # dropping root privileges, so keep the key file unreadable by anyone but # root. Included doc/mkcert.sh can be used to easily generate self-signed # certificate, just make sure to update the domains in dovecot-openssl.cnf # Note: This key is managed by Server Admin. See above before making changes ssl_cert = <@PREFIX@/etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.chain.pem # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before # dropping root privileges, so keep the key file unreadable by anyone but # root. Included doc/mkcert.sh can be used to easily generate self-signed # certificate, just make sure to update the domains in dovecot-openssl.cnf # Note: This key is managed by Server Admin. See above before making changes ssl_key = <@PREFIX@/etc/certificates/private/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem.decrypted # To use macOS Server v5.10 generated certificates: # # 0. Identify the file that looks like @host@.@domain@.@tld@.@CERTIFICATE_SHA1@.cert.pem # and verify its issue date and issuer "* Intermediate CA" with: # # $ ls /etc/certificates # $ openssl x509 -inform pem -in /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.cert.pem -text -noout # $ openssl x509 -noout -fingerprint -sha1 -inform pem -in openssl x509 -noout -fingerprint -sha1 -inform pem -in /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.cert.pem | tr -d ':' | sed -e 's|^SHA1 Fingerprint=||' | tr -d ':' | sed -e 's|^SHA1 Fingerprint=||' # # Use this SHA1 to obtain the passphraphse for this certificate's private key from: # # Keychain Access.app> System> Search for this SHA1> # Double-click "Mac OS X Server certificate management"> Show password # # 1. Create a secure storage for this passphrase and desctrypted key: # # $ sudo mkdir -p @PREFIX@/etc/certificates/private # $ sudo chmod 0700 @PREFIX@/etc/certificates/private # $ sudo vi @PREFIX@/etc/certificates/private/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem.passphrase /etc/certificates/private # $ sudo chmod -R go-rwx @PREFIX@/etc/certificates/private # # `ssl_key_password` wasn't working on my install, so put the decrypted key in @PREFIX@/etc/certificates/private # # $ sudo openssl pkey -in /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem -out @PREFIX@/etc/certificates/private/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem.decrypted -passin file:@PREFIX@/etc/certificates/private/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem.passphrase # $ sudo chmod -R go-rwx @PREFIX@/etc/certificates/private # # 2. Link to the existing TLS chain. # # $ sudo ln -s /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.cert.pem @PREFIX@/etc/certificates # $ sudo ln -s /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.key.pem @PREFIX@/etc/certificates # $ sudo ln -s /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.chain.pem @PREFIX@/etc/certificates # $ sudo ln -s /etc/certificates/@host@.@domain@.@tld@.@CERTIFICATE_SHA1@.concat.pem @PREFIX@/etc/certificates # # 3. Confirm restricted permissions: # # $ ls -l @PREFIX@/etc/certificates # $ sudo ls -l @PREFIX@/etc/certificates/private # # 4. Finally, reconfigure dovecot's conf.d/10-ssl.conf, postfix's master.cf, # and, if installed, calendar-contacts-server's proxy nginx.conf: # # $ sudo vi @PREFIX@/etc/dovecot/conf.d/10-ssl.conf # $ sudo vi @PREFIX@/etc/postfix/main.cf # $ sudo vi @PREFIX@/var/calendarserver/Library/CalendarServer/etc/nginx.conf # If key file is password protected, give the password here. Alternatively # give it when starting dovecot with -p parameter. Since this file is often # world-readable, you may want to place this setting instead to a different # root owned 0600 file by using ssl_key_password =