make inet_protocol configurable
This commit is contained in:
parent
4723a4336f
commit
eeb6be696b
3 changed files with 10 additions and 1 deletions
|
@ -40,3 +40,6 @@
|
|||
|
||||
# Optional: This will use allow you to set a custom $message_size_limit value. Default is 10240000.
|
||||
#MESSAGE_SIZE_LIMIT=
|
||||
|
||||
# Optional: This will let you decide which ip-protocol should be used.
|
||||
#INET_PROTOCOL=[ipv4|ipv6|all]
|
||||
|
|
|
@ -10,7 +10,6 @@ RUN apk update --no-cache && \
|
|||
postfix && \
|
||||
mkdir -p /var/log/supervisor/ /var/run/supervisor/ && \
|
||||
sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf && \
|
||||
sed -i -e 's/inet_protocols = all/inet_protocols = ipv4/g' /etc/postfix/main.cf && \
|
||||
chmod +x /run.sh && \
|
||||
newaliases
|
||||
|
||||
|
|
7
run.sh
7
run.sh
|
@ -120,6 +120,13 @@ if [ ! -z "${MESSAGE_SIZE_LIMIT}" ]; then
|
|||
echo "Setting configuration option message_size_limit with value: ${MESSAGE_SIZE_LIMIT}"
|
||||
fi
|
||||
|
||||
# Set inet_protocol
|
||||
if [ ! -z "${INET_PROTOCOL}" ]; then
|
||||
sed -i -e 's/inet_protocols = all/inet_protocols = ipv4/g' /etc/postfix/main.cf
|
||||
echo "Setting configuration option inet_protocols with value: ${INET_PROTOCOL}"
|
||||
fi
|
||||
|
||||
|
||||
#Start services
|
||||
|
||||
# If host mounting /var/spool/postfix, we need to delete old pid file before
|
||||
|
|
Loading…
Reference in a new issue