Преглед на файлове

Update mailserver role to use LE certificate

Mike Ashley преди 9 години
родител
ревизия
beaceafbd1

+ 4
- 1
roles/mailserver/tasks/dovecot.yml Целия файл

38
     - 10-auth.conf
38
     - 10-auth.conf
39
     - 10-mail.conf
39
     - 10-mail.conf
40
     - 10-master.conf
40
     - 10-master.conf
41
-    - 10-ssl.conf
42
     - auth-sql.conf.ext
41
     - auth-sql.conf.ext
43
   notify: restart dovecot
42
   notify: restart dovecot
44
 
43
 
44
+- name: Template 10-ssl.conf
45
+  template: src=etc_dovecot_conf.d_10-ssl.conf.j2 dest=/etc/dovecot/conf.d/10-ssl.conf
46
+  notify: restart dovecot
47
+
45
 - name: Template 15-lda.conf
48
 - name: Template 15-lda.conf
46
   template: src=etc_dovecot_conf.d_15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
49
   template: src=etc_dovecot_conf.d_15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
47
   notify: restart dovecot
50
   notify: restart dovecot

roles/mailserver/files/etc_dovecot_conf.d_10-ssl.conf → roles/mailserver/templates/etc_dovecot_conf.d_10-ssl.conf.j2 Целия файл

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_combined.pem
13
-ssl_key = </etc/ssl/private/wildcard_private.key
12
+ssl_cert = </etc/letsencrypt/live/{{ domain }}/fullchain.pem
13
+ssl_key = </etc/letsencrypt/live/{{ domain }}/privkey.pem
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
16
 # give it when starting dovecot with -p parameter. Since this file is often
16
 # give it when starting dovecot with -p parameter. Since this file is often

+ 2
- 2
roles/mailserver/templates/etc_postfix_main.cf.j2 Целия файл

40
 smtp_tls_mandatory_protocols=!SSLv2,!SSLv3
40
 smtp_tls_mandatory_protocols=!SSLv2,!SSLv3
41
 smtp_tls_protocols = !SSLv2,!SSLv3
41
 smtp_tls_protocols = !SSLv2,!SSLv3
42
 smtpd_tls_protocols = !SSLv2,!SSLv3
42
 smtpd_tls_protocols = !SSLv2,!SSLv3
43
-smtpd_tls_cert_file=/etc/ssl/certs/wildcard_combined.pem
44
-smtpd_tls_key_file=/etc/ssl/private/wildcard_private.key
43
+smtpd_tls_cert_file=/etc/letsencrypt/live/{{ domain }}/fullchain.pem
44
+smtpd_tls_key_file=/etc/letsencrypt/live/{{ domain }}/privkey.pem
45
 smtpd_use_tls=yes
45
 smtpd_use_tls=yes
46
 smtpd_tls_auth_only = yes
46
 smtpd_tls_auth_only = yes
47
 smtp_tls_security_level = may
47
 smtp_tls_security_level = may

Loading…
Отказ
Запис