From ff5619900936ddb9f6d11774ee5e4c5a99c98b46 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 11 Oct 2020 01:44:59 +0200 Subject: supersede TLS_CERT TLS_KEY by redpill config mailhost --- postfix/postfix.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/postfix/postfix.sh b/postfix/postfix.sh index c14a1ba..e3c5d54 100755 --- a/postfix/postfix.sh +++ b/postfix/postfix.sh @@ -32,6 +32,7 @@ FORCE=${FORCE:-} REDPILL=${REDPILL:-REDPILL} REALM=${REALM:-ORG} +# superseded by redpill config mailhost TLS_CERT=${TLS_CERT:-/etc/ssl/certs/postfix.pem} TLS_KEY=${TLS_KEY:-/etc/ssl/private/postfix.pem} @@ -133,6 +134,8 @@ getlinesfromfile() { catfirstfile "$param" | sed 's/#.*//' | tr '\n' ',' | sed -e 's/^[, ]*//;s/[, ]\+/,/g' -e 's/\^/ /g' -e "s/,\$//$replacements" } +thismailhost="$(cat /etc/local/mailhost || catfilefromownrealm mailhost)" + #ENABLE_POSTGREY= #if [ -x /usr/sbin/postgrey ]; then # # FIXME: Use this somehow, and only warn below @@ -157,6 +160,8 @@ else warn "Dovecot missing - (Debian package dovecot-core or dovecot)." fi ENABLE_TLS= +[ -z "$thismailhost" ] || TLS_CERT="/etc/ssl/shared/$thismailhost.pem" +[ -z "$thismailhost" ] || TLS_KEY="/etc/ssl/private/$thismailhost.pem" if [ -f "$TLS_CERT" ] && [ -f "$TLS_KEY" ]; then ENABLE_TLS=1 else -- cgit v1.2.3