[CentOS] Physically moving a mail server vs. cached DNS

Sat Jul 1 09:00:10 UTC 2017
Pete Biggs <pete at biggs.org.uk>

> In your experience, what's the "longest" a DNS cache is configured to
> keep outdated information? A day? A week? A month? Longer?
That is controlled by the TTL (time to live) entry. A DNS server must
refresh it's cache within the TTL for the entry. Using the '-a' option
to host will give you more information:

    $ host -a microlinux.fr
    Trying "microlinux.fr"
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2261
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 2

    ;microlinux.fr.    	    	    	    IN    	    ANY

    microlinux.fr.    	    	    86400    	    IN    	    SOA    	    ns.microlinux.fr. hostmaster.microlinux.fr. 2017070101 10800 600 1814400 10800
    microlinux.fr.    	    	    86400    	    IN    	    A
    microlinux.fr.    	    	    86400    	    IN    	    MX    	    10 mail.microlinux.fr.
    microlinux.fr.    	    	    86400    	    IN    	    NS    	    ns.microlinux.fr.
    microlinux.fr.    	    	    86400    	    IN    	    NS    	    nssec.online.net.

    mail.microlinux.fr.    	    86400    	    IN    	    A
    ns.microlinux.fr.    	    86400    	    IN    	    A

The '86400' is the TTL - it's in seconds so that's 24 hours. So it all
depends on what the TTL was set to for your old DNS provider.

TTL is a balance between accuracy and network traffic - most DNS
entries don't change for months, so 24 hours is perfectly acceptable.
If accuracy is an issue while a DNS entry changes, then admins often
reduce the TTL during the transition period.

If a particular host is still serving an old DNS entry from its cache
after a TTL has expired, then it's broken. There's not a lot you can do
other than shout at the hostmaster or wait until its personal view of
the world expires.