Skip to content

Instantly share code, notes, and snippets.

@eru
Last active October 6, 2016 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eru/af17e91d769aba64e74d0a6472338656 to your computer and use it in GitHub Desktop.
Save eru/af17e91d769aba64e74d0a6472338656 to your computer and use it in GitHub Desktop.
#! /bin/sh
#
# check-mx-record.sh
# Copyright (C) 2016 Kazuki Hashimoto <eru.tndl@gmail.com>
#
# Distributed under terms of the MIT license.
#
# e.g.
# ./check-mx-record.sh ns DOMAIN_LIST
# DOMAIN_LIST sample file: https://gist.github.com/b5a86150f98b3d6102d5608878ca53f0
while read line
do
dig $line $1 | sed -n -e '/;; ANSWER SECTION:/,/^$/p'
done < $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment