diff options
-rwxr-xr-x | postfix/postfix.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh index a32408d..62b228e 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -260,8 +260,13 @@ fi # outbound opportunistic encryption _postconf -e smtp_tls_security_level=may -_postconf -e smtp_tls_cert_file=/etc/ssl/certs/postfix.pem -_postconf -e smtp_tls_key_file=/etc/ssl/private/postfix.pem +if [ -n "$tls_cert" ]; then + _postconf -e smtp_tls_cert_file=/etc/ssl/certs/postfix.pem + _postconf -e smtp_tls_key_file=/etc/ssl/private/postfix.pem +else + _postconf -X smtp_tls_cert_file + _postconf -X smtp_tls_key_file +fi _postconf -e smtp_tls_loglevel=1 # Force TLS towards peers |