summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpostfix/postfix.sh5
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