Skip to content

Commit

Permalink
allow prioritizing ipv4
Browse files Browse the repository at this point in the history
  • Loading branch information
maxadamo committed Sep 5, 2024
1 parent 1ff6f24 commit f552f3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ From a networking perspective:
| `ENABLE_OPENDKIM` | Optional. Set to "true" to enable OpenDKIM. If OpenDKIM is enabled, the "OpenDKIM Configuration" variables below will need to be set. Default is "false". |
| `ENABLE_POSTGREY` | Optional. Set to "true" to enable [postgrey](https://postgrey.schweikert.ch). Default is "false". |
| `ENABLE_SPF` | Optional. Set to "true" to enable [policyd-spf](https://launchpad.net/postfix-policyd-spf-perl/). Default is "false". |
| `PREFER_IPV4` | Optional. Prioritize IPv4. Set to "true" to enable [gai.conf](https://man7.org/linux/man-pages/man5/gai.conf.5.html). Default is false. |
| `POSTMASTER_EMAIL` | Required. Set to the email of your domain's postmaster. Example: `[email protected]`. |
| `TZ` | Recommended. Set the timezone for the container. Default is `UTC`. |

Expand Down
7 changes: 7 additions & 0 deletions rootfs/etc/cont-init.d/99-other.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

# Add precedence to IPv4
if [ -z "${PREFER_IPV4}" ]; then
echo 'precedence ::ffff:0:0/96 100' >>/etc/gai.conf
fi

0 comments on commit f552f3f

Please sign in to comment.