How do I make Mail in a Box use my new IPv6 address?
I have Mail-in-a-Box running on a linode. Got assigned an IPv6 /64 subnet so I can meet Spamhaus's requirements to get unblocked, and followed https://www.linode.com/docs/networking/linode-network/linux-static-ip-configuration/#ubuntu-18-04 to make the system use one of the new addresses. However, Mail-in-a-Box is still using the old address, and even shows it when running mailinabox
, while ip address
shows both.
I'm not really sure whether this is a Linode problem, a Mail-in-a-Box problem, or if I just screwed up somewhere. Regardless, any help would be appreciated.
11 Replies
@Fenhl --
As the superuser, you need to hand-edit (using nano or vi or whatever) the file /etc/postfix/main.cf. Change:
inet_protocols=ipv4
to
#inet_protocols=ipv4
inet_protocols = all
Restart postfix:
sudo systemctl restart postfix
-- sw
The issue isn't that MiaB isn't using IPv6 at all. It is using IPv6, just the wrong address.
For dovecot(1), you need to edit /etc/dovecot/dovecot.conf and make sure it says:
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *, ::
Restart dovecot(1) if you made any changes:
sudo systemctl restart dovecot
Which protocol your postfix(1) MTA daemons use is up to postfix(1) because whoever postfix(1) may be communicating with may be using a specific protocol. You can't predict which because this is a function of the remote MTA, not your postfix(1).
If you want it to use ONLY IPv6, you can change this to:
inet_protocols = ipv6
but that would be like stepping on a land mine for thrills.
-- sw
You write:
The issue isn't that MiaB isn't using IPv6 at all. It is using IPv6, just the wrong address.
Are the DNS AAAA & MX records for your server correct? I've never had this problem.
-- sw
The dovecot config did not have a listen
line, which as I understand it is the correct config since *, ::
is the default.
Mail-in-a-Box provides its own DNS. Since it is misconfigured, the records are presumably incorrect.
You write:
Mail-in-a-Box provides its own DNS. Since it is misconfigured, the records are presumably incorrect.
You can fix them with the DNS Manager…
- https://www.linode.com/docs/platform/manager/dns-manager/
- https://www.linode.com/docs/networking/dns/common-dns-configurations/
- https://www.linode.com/docs/platform/manager/troubleshooting-dns/
-- sw
You mean MiaB's Custom DNS feature? I just tried that and it didn't work (same mailinabox
and ip address
output, MiaB status checks still use the old address, and setting reverse DNS still doesn't work).
Sorry, I just saw the links you posted. I don't see how they're relevant since I'm not using Linode's DNS at all.
You write:
Sorry, I just saw the links you posted. I don't see how they're relevant since I'm not using Linode's DNS at all.
Looks like you're on your own then…
-- sw
I just had the exact same issue as the original poster, but once I went through the static IP configuration process the OP linked to, and rebooted the Linode, I re-ran the mailinabox initialization via the usual command curl -s https://mailinabox.email/setup.sh | sudo bash
. Note I am at mailinabox v55. During its operation, it asked me for the IPv6 address of the box, so I supplied a new one from the independent /64 subnet they just gave me, not the old original one in the main Linode /64 subnet. That seemed to fix up the forward DNS and get mailinabox to use the new IPv6 address. I then went to the Linode control panel for my Linode, clicked Network, and then edited the rDNS for the particular address I put into mailinabox to return my mailinabox's domain name. It all seems to be working now and it seems my mail server is no longer listed at SpamHaus. (On the other hand, there does seem to be a UCEProtect Level 3 listing for Linode as a whole that is still affecting me when I try to send to certain addresses. I have just filed a Linode ticket about that, hopefully I will hear back something positive so that I don't have to relocate this mailinabox despite all this effort…)