You’ve actually got a couple of choices (or at least these worked for me on previous versions of MIAB):
-
Run without IPv6. Disable IPv6 before you run the install. (E.g. execute
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
andsudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
.) MIAB will configure itself without reference to IPv6 addresses. When you next reboot, IPv6 will come back but as your mail config is IPv4 only, the IPv6 addresses are unused.As your install currently includes IPv6, you’ll have to remove/blank the references to IPv6 addresses in
/etc/mailinthebox.conf
, then disable IPv6, and then rerunsudo mailinthebox
to refresh the install. -
Setup IPv6 email. This is a little more involved but it works for me. First find out your server’s static “external” IPv6 address. (Your box will acquire multiple IPv6 addresses, only one will be visible externally and unchanging - that’s the one to use. The external address will not start
fd
orfe
.)
-
Arrange with your ISP/provider that IPv6 reverse DNS resolution is “delegated” to your box. This should be a simple matter of going to their website, ticking a box and providing the full name of your DNS server (eg. ns1.box.example.com)
-
Build yourself an IPv6 rDNS record. First use a tool like Reverse DNS Generator to convert your IPv6 into reverse format. The file lives in
/etc/nsd/zones.
My address is 2403:5806:96::20 and my reverse address looks like 0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.9.0.0.6.0.8.5.3.0.4.2.ip6.arpa. (Use a web tool to get all the zeros correct!)The rDNS record is just a text file should be named as your (reversed) subset. My subnet is 2403:5806:96 so my rDNS file is
/etc/nsd/zones/6.9.0.0.6.0.8.5.3.0.4.2.ip6.arpa.txt
. The contents of your file will differ in the address and dns name, but mine contains the following (the trailing dots on the DNS names are required):
;
; 2403:5806:96::/48
;
; Zone file built with the IPv6 Reverse DNS zone builder
; http://rdns6.com/
;
$TTL 1h ; Default TTL
@ IN SOA ns1.box.shh.one. admin.box.shh.one. (
2021101602 ; serial
1h ; slave refresh interval
15m ; slave retry interval
1w ; slave copy expire time
1h ; NXDOMAIN cache time
)
;
; domain name servers
;
@ IN NS ns1.box.shh.one.
; IPv6 PTR entries
0.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.9.0.0.6.0.8.5.3.0.4.2.ip6.arpa. IN PTR box.shh.one.
- Add a local zones config file so the DNS server knows to use the zone record from step 2. This file is called
/etc/nsd/nsd.conf.d/local.conf
. You will need to adjust the addresses, but my config file contains:
# local (non-managed) zone config
zone:
name: 6.9.0.0.6.0.8.5.3.0.4.2.ip6.arpa
zonefile: 6.9.0.0.6.0.8.5.3.0.4.2.ip6.arpa.txt
-
(At least) restart your DNS server (
sudo systemctl restart nsd
) - personally, I like reboot the server! -
Go to your domain regsitrar and ensure that the IPv6 address of your ns1.box.example.com is listed in the glue records, and check that your DNSSEC records match that shown on the MIAB control panel. (Everything else is provided by MIAB.)
-
Give it a few minutes for luck, then check the MX, DNS and AAAA records. You should have 2 entries in the MX, an AAAA lookup should return your IPv6 address, and a reverse lookup on your IPv6 should return your box name. Personally, I use Network Tools: DNS,IP,Email but whatever you prefer.