In this article we will talk about some important points in case you are moving your email servers to a cloud provider and also will show how to use the NSLookup command via command prompt to query one domain via DNS, this can be useful in case you are working on a migration or just curious about the details and how it works.
If you are considering the migration of your email servers to a cloud provider its important to understand the following items:
– If the cloud provider can support the growth of your environment and the costs related to it;
– If it meet the technical specifications of your environment and can guarantee no operational impact during the migration;
– Also if there is a validation plan to ensure everything is working properly after the migration and if the cloud provider will offer any support and at what level during and after the migration.
We start by checking DNS details using MS Windows command prompt and NSLookup
C:\>nslookup Server: UnKnown Address: fe80::dafb:5eff:feeb:9441
Type the domain name we are looking for:
> devopsdojo.org Server: UnKnown Address: fe80::dafb:5eff:feeb:9441 Non-authoritative answer: Name: devopsdojo.org Address: 18.104.22.168
Use set type=ANY to view more details of the domain you are checking
> set type=ANY > devopsdojo.org Server: UnKnown Address: fe80::dafb:5eff:feeb:9441 Non-authoritative answer: devopsdojo.org text = "v=spf1 include:zoho.com ~all" devopsdojo.org nameserver = ns69.domaincontrol.com devopsdojo.org nameserver = ns70.domaincontrol.com devopsdojo.org primary name server = ns69.domaincontrol.com responsible mail addr = dns.jomax.net serial = 2018062000 refresh = 28800 (8 hours) retry = 7200 (2 hours) expire = 604800 (7 days) default TTL = 600 (10 mins) devopsdojo.org internet address = 22.214.171.124 devopsdojo.org MX preference = 10, mail exchanger = mx.zoho.com devopsdojo.org MX preference = 20, mail exchanger = mx2.zoho.com devopsdojo.org MX preference = 30, mail exchanger = mx3.zoho.com ns69.domaincontrol.com internet address = 126.96.36.199 ns69.domaincontrol.com AAAA IPv6 address = 2607:f208:206::2d ns70.domaincontrol.com internet address = 188.8.131.52 ns70.domaincontrol.com AAAA IPv6 address = 2603:5:2284::2d
DNS Zone Serial Numbers
Please note that zones have a serial number so you will be able to identify when the domain zone gets updated
Serial numbers are important to inform which server has the latest version of a determined zone, when DNS servers are transfering zones they check this number to identify which one has the more recent version of that zone and which one must be updated.
Serial number format is composed by a date timestamp and a incremental number of two digits as shown below:
YYYY = Year with 4 digits
MM = Month with 2 digits
DD = Day with 2 digits
99 = An incremental number with 2 digits (01,02,03…)
serial = 2018062000
MX is the type of record that represent the Mail Exchangers for a domain and its configuration have preferences that were defined when these records werecreated, that means when the Mail Transfer Agent is looking for a remote server to deliver messages if finds the domain first and then locate the Mail Exchanger for that domain so then it tries to open a connection to the MX using destination port 25/TCP to deliver one or more messages trying first the server with lower preference and the others consecutively in case one isn’t available, so in this case it would try preference 10 first and then 20 and 30 consecutively.
Use the set type=mx to see Mail Exchanger (MX) resources and the priority set for each one.
> set type=MX > devopsdojo.org Server: UnKnown Address: fe80::dafb:5eff:feeb:9441 Non-authoritative answer: devopsdojo.org MX preference = 10, mail exchanger = mx.zoho.com devopsdojo.org MX preference = 20, mail exchanger = mx2.zoho.com devopsdojo.org MX preference = 30, mail exchanger = mx3.zoho.com