Project Description:
Given a list of domains, collect the MX servers using DNS and output one row per MX server and the following fields:
· AUTO_SEQ_ID (Starting with 1 then 2 and so on)
· Domain (from input file)
· MX_PRIORITY
· MX_SERVER
· FIRST_Y/N
e.g.
$ dig mx +short slb.com
200 mail0.slb.com.
250 mail.messaging.microsoft.com.
600 mail.global.frontbridge.com.
Provide all the records of mx but mark the highest Priority one for each domain. If there are multiple servers with the same highest priority – Mark the one with the shortest field length.
So the output for the above example is as follows:
1,slb.com,200,mail0.slb.com,Y
2,slb.com,250,mail.messaging.microsoft.com,N
3,slb.com,600,mail.global.frontbridge.com,N