Reply to comment:

Marco Hogewoning
Just to clarify, but with "testing if IPv6 is available", you mean look for an AAAA on the MX, right?