Skip to content

Commit

Permalink
Merge branch '13-net-dev' into 'master'
Browse files Browse the repository at this point in the history
Resolve #13 "Net dev"

See merge request ix.ai/smtp!15
  • Loading branch information
tlex committed Jan 20, 2023
2 parents 564c563 + 9feb183 commit ad88cd2
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 @@ -23,6 +23,8 @@ 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.

The container accepts `NET_DEV` environment variable to override the default `eth0` interface for retrieving the IP address for relay networks.

## Below are scenarios for using this container

### As SMTP Server
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fi
opts=(
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}"
dc_relay_nets "$(ip addr show dev "${NET_DEV:-eth0}" | awk '$1 == "inet" { print $2 }' | xargs | sed 's/ /:/g')${RELAY_NETWORKS}"
)

if [ "$DISABLE_IPV6" ]; then
Expand Down

0 comments on commit ad88cd2

Please sign in to comment.