Page:
IPv6
Pages
Configure AWS SES
Configure Accounts
Configure Aliases
Configure DKIM
Configure DMARC
Configure Fail2ban
Configure LDAP
Configure POP3
Configure Relay Hosts
Configure SPF
Configure SSL
Configure Sieve filters
Configure autodiscover
Debugging
FAQ and Tips
Forward Only mailserver with LDAP authentication
Full text search
Home
IPv6
Installation Examples
Introduction
List of optional config files & directories
Override Default Dovecot Configuration
Override Default Postfix Configuration
Retrieve emails from a remote mail server (using builtin fetchmail)
Understanding the ports
Update and cleanup
Using in Kubernetes
setup.sh
1
IPv6
Luke Cyca edited this page 2020-10-08 15:45:58 -07:00
Table of Contents
Background
If your container host supports IPv6, then docker-mailserver
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 docker-mailserver
container.
Setup steps
+++ b/serv/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '2'
+version: '2.1'
@@ -32,6 +32,16 @@ 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
@@ -306,4 +316,13 @@ networks:
+ default:
+ driver: bridge
+ enable_ipv6: true
+ ipam:
+ driver: default
+ config:
+ - subnet: fd00:0123:4567::/48
+ gateway: fd00:0123:4567::1
Further discussion
See issue #1438
© Docker Mailserver Organization
This project is licensed under the MIT license.