feat: Add ENV option to enable subject line logging
This commit is contained in:
committed by
Juan Luis Baptiste
parent
f831f935b9
commit
f280c00f87
11
run.sh
11
run.sh
@@ -61,11 +61,18 @@ fi
|
||||
|
||||
#Set 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
|
||||
postconf -e "header_checks = regexp:/etc/postfix/header_checks"
|
||||
echo -e "/^MIME-Version:/i PREPEND RelayTag: $SMTP_HEADER_TAG\n/^Content-Transfer-Encoding:/i PREPEND RelayTag: $SMTP_HEADER_TAG" >> /etc/postfix/header_checks
|
||||
echo "Setting configuration option SMTP_HEADER_TAG with value: ${SMTP_HEADER_TAG}"
|
||||
fi
|
||||
|
||||
#Enable logging of subject line
|
||||
if [ "${LOG_SUBJECT}" == "yes" ]; then
|
||||
postconf -e "header_checks = regexp:/etc/postfix/header_checks"
|
||||
echo -e "/^Subject:/ WARN" >> /etc/postfix/header_checks
|
||||
echo "Enabling logging of subject line"
|
||||
fi
|
||||
|
||||
#Check for subnet restrictions
|
||||
nets='10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16'
|
||||
if [ ! -z "${SMTP_NETWORKS}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user