diff options
author | Jonas Smedegaard <dr@jones.dk> | 2020-10-11 01:44:59 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2020-10-11 01:44:59 +0200 |
commit | ff5619900936ddb9f6d11774ee5e4c5a99c98b46 (patch) | |
tree | ce77eb06f714fe5e061582d12203a278665e56f8 | |
parent | f3f638118d36c105672d328b85b037a52a8048b0 (diff) |
supersede TLS_CERT TLS_KEY by redpill config mailhost
-rwxr-xr-x | postfix/postfix.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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 |