library/roles/postfix-relay/templates/main.cf.j2: Fix the postfix template when using letsencrypt certificates.

This commit is contained in:
Andrea Dell'Amico 2018-05-07 15:55:38 +02:00
parent 5d2b5e6f1c
commit 71f2fcd730
1 changed files with 4 additions and 3 deletions

View File

@ -16,18 +16,19 @@ readme_directory = no
# TLS parameters
# Server
{% if letsencrypt_acme_install is defined and letsencrypt_acme_install %}
{% if letsencrypt_acme_install is defined %}
{% if postfix_use_letsencrypt %}
smtpd_tls_cert_file={{ letsencrypt_acme_certs_dir }}/cert
smtpd_tls_key_file={{ letsencrypt_acme_certs_dir }}/privkey
{% else %}
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
{% else %}
{% endif %}
{% endif %}
{% if letsencrypt_acme_install is not defined %}
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
{% endif %}
{% endif %}
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
{% if postfix_relay_server %}
smtpd_tls_security_level = encrypt