Merge pull request #9 from turboaaa/patch-3
Create tag for optional upstream tracking.
This commit is contained in:
commit
92b283d6d4
@ -31,6 +31,9 @@ The following env variables need to be passed to the container:
|
|||||||
* `SMTP_PASSWORD` Password of the SMTP user.
|
* `SMTP_PASSWORD` Password of the SMTP user.
|
||||||
* `SERVER_HOSTNAME` Server hostname for the Postfix container. Emails will appear to come from the hostname's domain.
|
* `SERVER_HOSTNAME` Server hostname for the Postfix container. Emails will appear to come from the hostname's domain.
|
||||||
|
|
||||||
|
The following env variable(s) are optional.
|
||||||
|
* `SMTP_HEADER_TAG` This will add a header for tracking messages upstream. Helpful for spam filters. Will appear as "RelayTag: ${SMTP_HEADER_TAG}" in the email headers.
|
||||||
|
|
||||||
To use this container from anywhere, the 25 port needs to be exposed to the docker host server:
|
To use this container from anywhere, the 25 port needs to be exposed to the docker host server:
|
||||||
|
|
||||||
docker run -d --name postfix -p "25:25" \
|
docker run -d --name postfix -p "25:25" \
|
||||||
|
7
run.sh
7
run.sh
@ -46,5 +46,12 @@ if [ ! -f /etc/postfix/sasl_passwd ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
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
|
||||||
|
echo "Setting configuration option SMTP_HEADER_TAG with value: ${SMTP_HEADER_TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
#Start services
|
#Start services
|
||||||
supervisord
|
supervisord
|
||||||
|
Loading…
Reference in New Issue
Block a user