readme and MYNETWORKS via ENV (#1)

* mynetworks via ENV

* Create README.md

* <br>
This commit is contained in:
Stefan S 2016-12-14 17:29:59 +01:00 committed by Boky
parent d83c121323
commit 3f4df6062a
2 changed files with 16 additions and 1 deletions

10
README.md Normal file
View file

@ -0,0 +1,10 @@
# docker-postfix
Simple postfix relay host for your Docker containers. Based on Alpine Linux.
```
ENV vars
$HOSTNAME= Postfix myhostname
$RELAYHOST= Host that relays your msgs
$MYNETWORKS= allow domains from per Network ( default 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 )
$ALLOWED_SENDER_DOMAINS = domains sender domains
```

View file

@ -41,7 +41,12 @@ fi
##echo "fd00::/8" >> $network_table
#postmap $network_table
#postconf -e mynetworks=hash:$network_table
postconf -e "mynetworks=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
if [[ ! -z "$MYNETWORKS" ]]; then
postconf -e relayhost=$MYNETWORKS
else
postconf -e "mynetworks=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
fi
# Split with space
if [[ ! -z "$ALLOWED_SENDER_DOMAINS" ]]; then