Browse Source

Use combined cert for postfix, dovecot, and znc

Fix CAcert usage in postfix and dovecot
Luke Cyca 11 years ago
parent
commit
ca8a371320

+ 4
- 0
roles/common/tasks/ssl.yml View File

7
 - name: Copy CA combined certificate into place
7
 - name: Copy CA combined certificate into place
8
   copy: src=wildcard_ca.pem dest=/etc/ssl/certs/wildcard_ca.pem group=root owner=root
8
   copy: src=wildcard_ca.pem dest=/etc/ssl/certs/wildcard_ca.pem group=root owner=root
9
 
9
 
10
+- name: Create a combined version of the public cert with intermediate and root CAs
11
+  shell: cat /etc/ssl/certs/wildcard_public_cert.crt /etc/ssl/certs/wildcard_ca.pem >
12
+    /etc/ssl/certs/wildcard_combined.pem creates=/etc/ssl/certs/wildcard_combined.pem
13
+
10
 - name: Enable Apache SSL module
14
 - name: Enable Apache SSL module
11
   command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
15
   command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load

+ 0
- 12
roles/ircbouncer/files/etc_ssl_znc-combined.pem View File

1
------BEGIN PRIVATE KEY-----
2
-TODO
3
------END PRIVATE KEY-----
4
------BEGIN CERTIFICATE-----
5
-TODO
6
------END CERTIFICATE-----
7
------BEGIN CERTIFICATE-----
8
-TODO
9
------END CERTIFICATE-----
10
------BEGIN CERTIFICATE-----
11
-TODO
12
------END CERTIFICATE-----

+ 0
- 3
roles/ircbouncer/tasks/znc.yml View File

34
 - name: Copy znc init file into place
34
 - name: Copy znc init file into place
35
   copy: src=etc_init.d_znc dest=/etc/init.d/znc mode=0755
35
   copy: src=etc_init.d_znc dest=/etc/init.d/znc mode=0755
36
 
36
 
37
-- name: Copy znc combined SSL cert into place
38
-  copy: src=etc_ssl_znc-combined.pem dest=/etc/ssl/znc-combined.pem owner=znc group=znc
39
-
40
 # NOTE: you should probably just generate this using the directions above and then edit via the web panel
37
 # NOTE: you should probably just generate this using the directions above and then edit via the web panel
41
 #- name: Copy znc configuration file into place
38
 #- name: Copy znc configuration file into place
42
 #  template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc
39
 #  template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc

+ 1
- 1
roles/ircbouncer/templates/var_lib_znc_configs_znc.conf.j2 View File

14
 MaxBufferSize = 500
14
 MaxBufferSize = 500
15
 PidFile = /var/run/znc/znc.pid
15
 PidFile = /var/run/znc/znc.pid
16
 ProtectWebSessions = true
16
 ProtectWebSessions = true
17
-SSLCertFile = /etc/ssl/znc-combined.pem
17
+SSLCertFile = /etc/ssl/certs/wildcard_combined.pem
18
 ServerThrottle = 30
18
 ServerThrottle = 30
19
 Skin = _default_
19
 Skin = _default_
20
 StatusPrefix = *
20
 StatusPrefix = *

+ 2
- 2
roles/mailserver/files/etc_dovecot_conf.d_10-ssl.conf View File

9
 # dropping root privileges, so keep the key file unreadable by anyone but
9
 # dropping root privileges, so keep the key file unreadable by anyone but
10
 # root. Included doc/mkcert.sh can be used to easily generate self-signed
10
 # root. Included doc/mkcert.sh can be used to easily generate self-signed
11
 # certificate, just make sure to update the domains in dovecot-openssl.cnf
11
 # certificate, just make sure to update the domains in dovecot-openssl.cnf
12
-ssl_cert = </etc/ssl/certs/wildcard_public_cert.crt
12
+ssl_cert = </etc/ssl/certs/wildcard_combined.pem
13
 ssl_key = </etc/ssl/private/wildcard_private.key
13
 ssl_key = </etc/ssl/private/wildcard_private.key
14
 
14
 
15
 # If key file is password protected, give the password here. Alternatively
15
 # If key file is password protected, give the password here. Alternatively
21
 # PEM encoded trusted certificate authority. Set this only if you intend to use
21
 # PEM encoded trusted certificate authority. Set this only if you intend to use
22
 # ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
22
 # ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
23
 # followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
23
 # followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
24
-ssl_ca = /etc/ssl/certs/wildcard_ca.pem
24
+#ssl_ca = /etc/ssl/ca.pem
25
 
25
 
26
 # Require that CRL check succeeds for client certificates.
26
 # Require that CRL check succeeds for client certificates.
27
 #ssl_require_crl = yes
27
 #ssl_require_crl = yes

+ 2
- 3
roles/mailserver/templates/etc_postfix_main.cf.j2 View File

38
 unverified_sender_reject_code = 554
38
 unverified_sender_reject_code = 554
39
  
39
  
40
 # TLS parameters
40
 # TLS parameters
41
-smtp_tls_CAfile = /etc/ssl/certs/wildcard_ca.pem
42
-smtpd_tls_CAfile = /etc/ssl/certs/wildcard_ca.pem
43
-smtpd_tls_cert_file=/etc/ssl/certs/wildcard_public_cert.crt
41
+smtpd_tls_cert_file=/etc/ssl/certs/wildcard_combined.pem
44
 smtpd_tls_key_file=/etc/ssl/private/wildcard_private.key
42
 smtpd_tls_key_file=/etc/ssl/private/wildcard_private.key
45
 smtpd_use_tls=yes
43
 smtpd_use_tls=yes
46
 #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
44
 #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
50
 smtp_tls_loglevel = 2
48
 smtp_tls_loglevel = 2
51
 smtpd_tls_received_header = yes
49
 smtpd_tls_received_header = yes
52
 smtp_tls_note_starttls_offer = yes
50
 smtp_tls_note_starttls_offer = yes
51
+smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
53
 
52
 
54
 smtpd_sasl_type = dovecot
53
 smtpd_sasl_type = dovecot
55
 smtpd_sasl_path = private/auth
54
 smtpd_sasl_path = private/auth

Loading…
Cancel
Save