SOLVED: IPv6 short notation vs. long notation

Hi,

i just moved my MIAB installation to a new server. Everything is looking good except my IPv6 config.
For all of my domains the status page is showing:

This domain should resolve to your box’s IP address (AAAA 2a01:XXXX:0191:64d0:0000:0000:0000:0004) if you would like the box to serve webmail or a website on this domain. The domain currently resolves to 2a01:XXXX:191:64d0::4 in public DNS. It may take several hours for public DNS to update after a change. This problem may result from other issues listed here.

This is my /etc/network/interfaces for IPv6

iface eth0 inet6 static
address 2a01:XXXX:191:64d0::4
netmask 64
gateway 2a01:XXXX:191:64d0::2

How can i say to my MIAB to use the short notation version of my IPv6 Address?

1 Like

There is an open issue on GitHub about this.

There was a fix, but it is incomplete. Working on a patch.

PR created here: https://github.com/mail-in-a-box/mailinabox/pull/1201

Is there anything left to do except editing this?

 		for (rtype, expected) in (("A", env['PUBLIC_IP']), ("AAAA", env.get('PUBLIC_IPV6'))):
  			if not expected: continue # IPv6 is not configured
  			value = query_dns(domain, rtype)
 -			if value == expected:
 +			if normalize_ip(value) == normalize_ip(expected):
  				ok_values.append(value)
  			else:
  				output.print_error("""This domain should resolve to your box's IP address (%s %s) if you would like the box to serve
 					webmail or a website on this domain. The domain currently resolves to %s in public DNS. It may take several hours for
 					public DNS to update after a change. This problem may result from other issues listed here.""" % (rtype, expected, value))
 				return

Because that did not work for me. Same error.

Did you try any of the suggestions in my post? So run it from the commandline or redeploy the interface? Just changing the file isn’t enough.

It’s merged into master, so if you know how to run the latest version that should also work. Or wait for the release of the new version.

Run it manually shows everything is fine… But on webinterface the error still exist:

commandline:

myserver.co

✓ Nameservers are set correctly at registrar. [ns1.box.myserver.co; ns2.box.myserver.co]
✓ Domain’s email is directed to this domain. [myserver.co ↦ 10 box.myserver.co]
✓ Postmaster contact address exists as a mail alias. [postmaster@myserver.co ↦ administrator@box.myserver.co]
✓ Domain is not blacklisted by dbl.spamhaus.org.
✓ Domain resolves to this box’s IP address. [myserver.co ↦ 144.XXX.60.218; 2a01:XXXX:191:64d0::4]

Webinterface:

This domain should resolve to your box’s IP address (AAAA 2a01:XXXX:0191:64d0:0000:0000:0000:0004) if you would like the box to serve webmail or a website on this domain. The domain currently resolves to 2a01:XXXX:191:64d0::4 in public DNS. It may take several hours for public DNS to update after a change. This problem may result from other issues listed here.

Then the change works. For it to activate on the web interface you need to deploy the interface.

If you want to check it in the website you need to install the management interface by running setup/management.sh
1 Like

Thank you that worked!

@prostream

How did you get to that file? Thanks!

Apparently, once I get to the file

I delete this line

  • if value == expected:

and I add (replace it with) this line

  • if normalize_ip(value) == normalize_ip(expected):

check to see that everything works (updated)
management/status_checks.py

and then run the setup:
setup/management.sh

before rebooting.

I don’t see where this file is.

you have to make the changes in this file:

management/status_checks.py

Before you run setup/management.sh you can run management/status_checks.py to make sure that everything is working.

1 Like

The file is under /root/mailinabox/management/status_checks.py, or whatever home directory you installed miab in.

1 Like

new problem:
File “management/status_checks.py”, line 644
if normalize_ip(value) == normalize_ip(expected):
^
IndentationError: unindent does not match any outer indentation level

the solution:
In MobaXterm, I went to View → Special Characters to see the tabs and spaces. Python can only have tabs or spaces apparently. I copied the tabs from the previous line and pasted them in where there were spaces, saved and reran the command; i.e., management/status_checks.py

I ran setup/management.sh and the IPv6 errors stopped.

Regarding the TLS certificates error
Something unexpected went wrong: Error creating new cert :: too many certificates already issued for:

Per Let’s Encrypt:

There’s a rate limit of 5 certificates per domain (TLD + 1, so subdomains count too) per 7 days in place. You will have to wait a week.

:frowning: