Hello people!
I am trying to set up a Mailcow installation on a host that only supports IPv6. I set up a Mailcow installation through Docker Compose successfully. I can access the admin control panel and the SoGo webmailer.
Unfortunately, I can neither send mails to other addresses nor receive mails I sent from that address. When I send an email from Mailcow (i.e. the webmailer) I don’t get any errors, the message simply doesn’t arrive. When trying to receive an email from that other address, I get an error that the message cannot be delivered.
Setup information
I am running all services from Docker Compose. Traefik is the reverse proxy and correctly redirects all requests to the specific services. When I enter my domain (xxxxxxx.de), I can visit the website, which is running on Wordpress. When I enter the mail host (mail.xxxxxxx.de) I am redirected to the Mailcow control panel.
In the control panel I can login using the Mailcow admin account. I set up all of my addresses and can log into the webmailer with all of them.
All of this is running on a VPS which only has IPv6 enabled. The OS is Alpine Linux. It does not support IPv4, using their IPv4-to-IPv6 proxy (which makes A-records possible) is not an option unfortunately.
DNS
The DNS records should be correct. I followed the Mailcow reference, except for the A-records, which I cannot configure, because my server doesn’t have an IPv4 address.
Compose files
Mailcow attaches to an external network created by the Traefik and also IPv6NAT containers. This is the override file, to make everything work with Traefik:
version: '2.1'
services:
nginx-mailcow:
networks:
- docker_app_net
labels:
- traefik.enable=true
# Creates a router called "moo" for the container, and sets up a rule to link the container to certain rule,
# in this case, a Host rule with our MAILCOW_HOSTNAME var.
- traefik.http.routers.moo.rule=Host(`${MAILCOW_HOSTNAME}`)
# Enables tls over the router we created before.
- traefik.http.routers.moo.tls=true
# Specifies which kind of cert resolver we'll use, in this case le (Lets Encrypt).
- traefik.http.routers.moo.tls.certresolver=myresolver
# Creates a service called "moo" for the container, and specifies which internal port of the container
# should traefik route the incoming data to.
- traefik.http.services.moo.loadbalancer.server.port=${HTTP_PORT}
# Specifies which entrypoint (external port) should traefik listen to, for this container.
# websecure being port 443, check the traefik.toml file liked above.
- traefik.http.routers.moo.entrypoints=websecure
# Make sure traefik uses the web network, not the mailcowdockerized_mailcow-network
- traefik.docker.network=web
certdumper:
image: humenius/traefik-certs-dumper
container_name: traefik_certdumper
network_mode: none
volumes:
# mount the folder which contains Traefik's `acme.json' file
# in this case Traefik is started from its own docker-compose in ../traefik
- ../traefik/data:/traefik:ro
# mount mailcow's SSL folder
- ./data/assets/ssl/:/output:rw
restart: always
environment:
# only change this, if you're using another domain for mailcow's web frontend compared to the standard config
- DOMAIN=${MAILCOW_HOSTNAME}
networks:
docker_app_net:
external: true
Firewall/networking
I had UFW running as the default Firewall, but disabled it following the recommendations in similar Mailcow threads.