Skip to content

Instantly share code, notes, and snippets.

@timendum
Created July 27, 2011 10:04
Show Gist options
  • Save timendum/1109053 to your computer and use it in GitHub Desktop.
Save timendum/1109053 to your computer and use it in GitHub Desktop.
Find SMTP server [ bash dns ]
dig +nocmd $DOMAIN MX +noall +answer | awk '{print $5 " " $6}' | sort -n | awk '{print substr($2,1,length($2)-1) " " $1 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment