10-ssl.conf.erb 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ##
  2. ## SSL settings
  3. ##
  4. # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
  5. <%= Dovecot::Conf.attribute(@conf, 'ssl', 'yes') %>
  6. # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
  7. # dropping root privileges, so keep the key file unreadable by anyone but
  8. # root. Included doc/mkcert.sh can be used to easily generate self-signed
  9. # certificate, just make sure to update the domains in dovecot-openssl.cnf
  10. <%= Dovecot::Conf.attribute(@conf, 'ssl_cert', '</etc/ssl/certs/dovecot.pem') %>
  11. <%= Dovecot::Conf.attribute(@conf, 'ssl_key', '</etc/ssl/private/dovecot.pem') %>
  12. # If key file is password protected, give the password here. Alternatively
  13. # give it when starting dovecot with -p parameter. Since this file is often
  14. # world-readable, you may want to place this setting instead to a different
  15. # root owned 0600 file by using ssl_key_password = <path.
  16. <%= Dovecot::Conf.attribute(@conf, 'ssl_key_password') %>
  17. # PEM encoded trusted certificate authority. Set this only if you intend to use
  18. # ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
  19. # followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
  20. <%= Dovecot::Conf.attribute(@conf, 'ssl_ca') %>
  21. # Request client to send a certificate. If you also want to require it, set
  22. # auth_ssl_require_client_cert=yes in auth section.
  23. <%= Dovecot::Conf.attribute(@conf, 'ssl_verify_client_cert', false) %>
  24. # Which field from certificate to use for username. commonName and
  25. # x500UniqueIdentifier are the usual choices. You'll also need to set
  26. # auth_ssl_username_from_cert=yes.
  27. <%= Dovecot::Conf.attribute(@conf, 'ssl_cert_username_field', 'commonName') %>
  28. # How often to regenerate the SSL parameters file. Generation is quite CPU
  29. # intensive operation. The value is in hours, 0 disables regeneration
  30. # entirely.
  31. <%= Dovecot::Conf.attribute(@conf, 'ssl_parameters_regenerate', 168) %>
  32. # SSL ciphers to use
  33. <%= Dovecot::Conf.attribute(@conf, 'ssl_cipher_list', 'ALL:!LOW:!SSLv2:!EXP:!aNULL') %>