deltachat / chatmail

chatmail service deployment scripts and docs
https://delta.chat/en/2023-12-13-chatmail
MIT License
97 stars 5 forks source link

Steps for Chatmail when IPv6 support is disabled in OS #306

Open roughnecks opened 1 month ago

roughnecks commented 1 month ago

Hello,

We had a situation with our VPS's host because they aren't letting customers set a PTR for IPv6. So the choice was pretty simple, disable IPv6 entirely on chatmail.

First I edited /etc/default/grub and added ipv6.disable=1 to:

GRUB_CMDLINE_LINUX_DEFAULT=
GRUB_CMDLINE_LINUX=

while preserving the other settings. Just add the new option at the end of those configurations (space separated options)

Then I rebooted the server and noticed I couldn't connect anymore to chatmail. Dovecot and nginx were down because both tried to listen to the now unsupported IPv6 address family.

Fix for nginx is easy, just remove the two listen [::]:443 lines in /etc/nginx/nginx.conf and restart the service. Fix for Dovecot was to add a new line to /etc/dovecot/dovecot.conf so that it only listens to IPv4:

listen = *

Last, when I tried to run mailq I also got this warning from Postfix, which I hadn't noticed before:

mailq: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postqueue: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
Mail queue is empty

To fix that I edited /etc/postfix/main.cf, changing from:

inet_protocols = all

to

inet_protocols = ipv4

Again, restart dovecot and postfix when done. Everyone seem extremely silent this evening on our server, but I believe everything is working alright, DC says it's connected and mailq is empty after sending a few messages myself..