1
1
Fork 0
mirror of https://github.com/docker-mailserver/docker-mailserver synced 2024-05-04 16:46:05 +02:00
docker-mailserver/docs/content/config/advanced/ipv6.md
Georg Lauterbach c461dabe9e
docs/misc: update to align with Docker Compose v2 (#3295)
* rename: `docker-compose.yml` => `compose.yaml`
* rename: `docker-compose` => `docker compose`
2023-05-10 11:02:44 +02:00

1.1 KiB

title
Advanced | IPv6

Background

If your container host supports IPv6, then DMS will automatically accept IPv6 connections by way of the docker host's IPv6. However, incoming mail will fail SPF checks because they will appear to come from the IPv4 gateway that docker is using to proxy the IPv6 connection (172.20.0.1 is the gateway).

This can be solved by supporting IPv6 connections all the way to the DMS container.

Setup steps

+++ b/serv/compose.yaml
@@ ... @@ services:

+  ipv6nat:
+    image: robbertkl/ipv6nat
+    restart: always
+    network_mode: "host"
+    cap_add:
+      - NET_ADMIN
+      - SYS_MODULE
+    volumes:
+      - /var/run/docker.sock:/var/run/docker.sock:ro
+      - /lib/modules:/lib/modules:ro

@@ ... @@ networks:

+  default:
+    driver: bridge
+    enable_ipv6: true
+    ipam:
+      driver: default
+      config:
+        - subnet: fd00:0123:4567::/48
+          gateway: fd00:0123:4567::1

Further Discussion

See #1438