From 630b283eea4b7ba0916a818e63fb540635ce602f Mon Sep 17 00:00:00 2001 From: turboaaa Date: Sat, 19 Jan 2019 23:58:15 -0500 Subject: [PATCH] Update run.sh Updated header tag variable. Configured to only set the header tag if variable is set. --- run.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/run.sh b/run.sh index 3a3e22c..0dc5232 100644 --- a/run.sh +++ b/run.sh @@ -47,14 +47,11 @@ if [ ! -f /etc/postfix/sasl_passwd ]; then fi #Set header tag -postconf -e "header_checks = regexp:/etc/postfix/header_tag" -if [ -z "${HEADER_TAG}" ]; then -TAG="$RANDOM" -else -TAG="${HEADER_TAG}" +if [ -z "${SMTP_HEADER_TAG}" ]; then + postconf -e "header_checks = regexp:/etc/postfix/header_tag" + echo -e "/^MIME-Version:/i PREPEND RelayTag: $SMTP_HEADER_TAG\n/^Content-Transfer-Encoding:/i PREPEND RelayTag: $SMTP_HEADER_TAG" > /etc/postfix/header_tag + echo "******** Header tag is $SMTP_HEADER_TAG *********" fi -echo -e "/^MIME-Version:/i PREPEND RelayTag: $TAG\n/^Content-Transfer-Encoding:/i PREPEND RelayTag: $TAG" > /etc/postfix/header_tag -echo "******** Header tag is $TAG *********" #Start services supervisord