You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. The format
10
10
11
11
-**Environment Variables:**
12
12
-[ENV can be declared with a `__FILE` suffix](https://docker-mailserver.github.io/docker-mailserver/v15.1/config/environment/) to read a value from a file during initial DMS setup scripts ([#4359](https://github.com/docker-mailserver/docker-mailserver/pull/4359))
13
+
- Improved docs for the ENV `OVERRIDE_HOSTNAME` ([#4492](https://github.com/docker-mailserver/docker-mailserver/pull/4492))
13
14
-**Internal:**
14
15
-[`DMS_CONFIG_POLL`](https://docker-mailserver.github.io/docker-mailserver/v15.0/config/environment/#dms_config_poll) supports adjusting the polling rate (seconds) for the change detection service `check-for-changes.sh` ([#4450](https://github.com/docker-mailserver/docker-mailserver/pull/4450))
Copy file name to clipboardExpand all lines: docs/content/config/environment.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,23 @@ title: Environment Variables
14
14
15
15
##### OVERRIDE_HOSTNAME
16
16
17
-
If you can't set your hostname (_eg: you're in a container platform that doesn't let you_) specify it via this environment variable. It will have priority over `docker run --hostname`, or the equivalent `hostname:` field in `compose.yaml`.
17
+
If you cannot set your DMS FQDN as your hostname (_eg: you're in a container runtime lacks the equivalent of Docker's `--hostname`_), specify it via this environment variable.
18
18
19
-
-**empty** => Uses the `hostname -f` command to get canonical hostname for DMS to use.
19
+
-**empty** => Internally uses the `hostname --fqdn` command to get the canonical hostname assigned to the DMS container.
20
20
- => Specify an FQDN (fully-qualified domain name) to serve mail for. The hostname is required for DMS to function correctly.
21
21
22
+
!!! info
23
+
24
+
`OVERRIDE_HOSTNAME` is checked early during DMS container setup. When set it will be preferred over querying the containers hostname via the `hostname --fqdn` command (_configured via `docker run --hostname` or the equivalent `hostname:` field in `compose.yaml`_).
25
+
26
+
!!! warning "Compatibility may differ"
27
+
28
+
`OVERRIDE_HOSTNAME` is not a complete replacement for adjusting the containers configured hostname. It is a best effort workaround for supporting deployment environments like Kubernetes or when using Docker with `--network=host`.
29
+
30
+
Typically this feature is only useful when software supports configuring a specific hostname to use, instead of a default fallback that infers the hostname (such as retrieving the hostname via libc / NSS). [Fetchmail is known to be incompatible][gh--issue::hostname-compatibility] with this ENV, requiring manual workarounds.
31
+
32
+
Compatibility differences are being [tracked here][gh-issue::dms-fqdn] as they become known.
33
+
22
34
##### LOG_LEVEL
23
35
24
36
Set the log level for DMS. This is mostly relevant for container startup scripts and change detection event feedback.
@@ -1183,3 +1195,5 @@ Provide the credentials to use with `RELAY_HOST` or `DEFAULT_RELAY_HOST`.
Copy file name to clipboardExpand all lines: mailserver.env
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@
9
9
# --- General Section ---------------------------
10
10
# -----------------------------------------------
11
11
12
-
# empty => uses the `hostname` command to get the mail server's canonical hostname
13
-
# => Specify a fully-qualified domainname to serve mail for. This is used for many of the config features so if you can't set your hostname (e.g. you're in a container platform that doesn't let you) specify it in this environment variable.
12
+
# **empty** => Internally uses the `hostname --fqdn` command to get the canonical hostname assigned to the DMS container.
13
+
# => Specify an FQDN (fully-qualified domain name) to serve mail for. The hostname is required for DMS to function correctly
14
+
#
15
+
# **WARNING**: Setting OVERRIDE_HOSTNAME can have difficult to predict side effects:
0 commit comments