Skip to content

Commit

Permalink
Merge pull request #41 from j3k0/master
Browse files Browse the repository at this point in the history
Add BIND_IP and BIND_IP6 env vars
  • Loading branch information
oba11 authored May 27, 2020
2 parents a7421e1 + b1ef22a commit 1f7bab7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The container accepts `MAILNAME` environment variable which will set the outgoin

The container also accepts the `PORT` environment variable, to set the port the mail daemon will listen on inside the container. The default port is `25`.

To configure the binding address, you can use `BIND_IP` and `BIND_IP6` environment variables. The default `BIND_IP` is `0.0.0.0`. The default `BIND_IP6` is `::0`.

To disable IPV6 you can set the `DISABLE_IPV6` environment variable to any value.

The container accepts `OTHER_HOSTNAMES` environment variable which will set the list of domains for which this machine should consider itself the final destination.
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ "$KEY_PATH" -a "$CERTIFICATE_PATH" ]; then
fi

opts=(
dc_local_interfaces "[0.0.0.0]:${PORT:-25} ; [::0]:${PORT:-25}"
dc_local_interfaces "[${BIND_IP:-0.0.0.0}]:${PORT:-25} ; [${BIND_IP6:-::0}]:${PORT:-25}"
dc_other_hostnames "${OTHER_HOSTNAMES}"
dc_relay_nets "$(ip addr show dev eth0 | awk '$1 == "inet" { print $2 }' | xargs | sed 's/ /:/g')${RELAY_NETWORKS}"
)
Expand Down

0 comments on commit 1f7bab7

Please sign in to comment.