Set MM_HOSTNAME to hostname -i.
This commit is contained in:
committed by
Abhilash Raj
parent
2126bae2a3
commit
a7ab6509f1
@@ -288,7 +288,7 @@ which is typically at `/etc/postfix/main.cf` on Debian based operating
|
|||||||
systems:
|
systems:
|
||||||
|
|
||||||
```
|
```
|
||||||
# master.cf
|
# main.cf
|
||||||
|
|
||||||
# Support the default VERP delimiter.
|
# Support the default VERP delimiter.
|
||||||
recipient_delimiter = +
|
recipient_delimiter = +
|
||||||
|
|||||||
@@ -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
|
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.
|
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
|
- `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.
|
emails. Default value is `172.19.199.1`, which is the address of the Host OS.
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ function wait_for_postgres () {
|
|||||||
# Empty the config file.
|
# Empty the config file.
|
||||||
echo "# This file is autogenerated at container startup." > /etc/mailman.cfg
|
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.
|
# Check if $MM_HOSTNAME is set, if not, set it to the value returned by
|
||||||
# TODO: Factor this out to a function.
|
# `hostname -i` command to set it to whatever IP address is assigned to the
|
||||||
|
# container.
|
||||||
if [[ ! -v MM_HOSTNAME ]]; then
|
if [[ ! -v MM_HOSTNAME ]]; then
|
||||||
export MM_HOSTNAME='172.19.199.2'
|
export MM_HOSTNAME=`hostname -i`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -v SMTP_HOST ]]; then
|
if [[ ! -v SMTP_HOST ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user