Update run.sh

Updated header tag variable. Configured to only set the header tag if variable is set.
This commit is contained in:
turboaaa 2019-01-19 23:58:15 -05:00 committed by GitHub
parent b8e5444956
commit 630b283eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
run.sh
View File

@ -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