diff --git a/README.md b/README.md index 6daa301..4d43069 100644 --- a/README.md +++ b/README.md @@ -288,7 +288,7 @@ which is typically at `/etc/postfix/main.cf` on Debian based operating systems: ``` -# master.cf +# main.cf # Support the default VERP delimiter. recipient_delimiter = + diff --git a/core/README.md b/core/README.md index a79403b..fd015c6 100644 --- a/core/README.md +++ b/core/README.md @@ -40,7 +40,8 @@ These are the variables that you MUST change before deploying: These are the variables that you don't need to change if you are using a standard version of docker-compose.yaml from this repository. -- `MM_HOSTNAME`: Default value is `mailman-core` +- `MM_HOSTNAME`: Which IP should Core bind to for REST API and LMTP. If not + defined output for `hostname -i` command is used. - `SMTP_HOST`: IP Address/hostname from which you will be sending emails. Default value is `172.19.199.1`, which is the address of the Host OS. diff --git a/core/assets/run.sh b/core/assets/run.sh index e4ff893..4fedd56 100755 --- a/core/assets/run.sh +++ b/core/assets/run.sh @@ -25,10 +25,11 @@ function wait_for_postgres () { # Empty the config file. echo "# This file is autogenerated at container startup." > /etc/mailman.cfg -# Check if $MM_HOSTNAME is set, if not, set it to a default value. -# TODO: Factor this out to a function. +# Check if $MM_HOSTNAME is set, if not, set it to the value returned by +# `hostname -i` command to set it to whatever IP address is assigned to the +# container. if [[ ! -v MM_HOSTNAME ]]; then - export MM_HOSTNAME='172.19.199.2' + export MM_HOSTNAME=`hostname -i` fi if [[ ! -v SMTP_HOST ]]; then