Skip to content

Instantly share code, notes, and snippets.

@caugner
Created February 19, 2013 22:41
Show Gist options
  • Save caugner/4990863 to your computer and use it in GitHub Desktop.
Save caugner/4990863 to your computer and use it in GitHub Desktop.
Get mail domain of a given domain
#!/bin/bash
if [ -n "$1" ]
then
host -t mx $1 | awk '{print $7}' | sed 's/.$//'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment