Browse Source

Update mailserver role to use LE certificate

Mike Ashley 9 years ago
parent
commit
beaceafbd1

+ 4
- 1
roles/mailserver/tasks/dovecot.yml View File

@@ -38,10 +38,13 @@
38 38
     - 10-auth.conf
39 39
     - 10-mail.conf
40 40
     - 10-master.conf
41
-    - 10-ssl.conf
42 41
     - auth-sql.conf.ext
43 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 48
 - name: Template 15-lda.conf
46 49
   template: src=etc_dovecot_conf.d_15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
47 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 View File

@@ -9,8 +9,8 @@ ssl = required
9 9
 # dropping root privileges, so keep the key file unreadable by anyone but
10 10
 # root. Included doc/mkcert.sh can be used to easily generate self-signed
11 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 15
 # If key file is password protected, give the password here. Alternatively
16 16
 # give it when starting dovecot with -p parameter. Since this file is often

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

@@ -40,8 +40,8 @@ smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
40 40
 smtp_tls_mandatory_protocols=!SSLv2,!SSLv3
41 41
 smtp_tls_protocols = !SSLv2,!SSLv3
42 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 45
 smtpd_use_tls=yes
46 46
 smtpd_tls_auth_only = yes
47 47
 smtp_tls_security_level = may

Loading…
Cancel
Save