mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-09-20 06:46:10 +08:00
readme and MYNETWORKS via ENV (#1)
* mynetworks via ENV * Create README.md * <br>
This commit is contained in:
parent
d83c121323
commit
3f4df6062a
10
README.md
Normal file
10
README.md
Normal 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
|
||||
```
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue