Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing for multiple MX records #70

Closed
TheNoButton opened this issue Apr 4, 2016 · 0 comments
Closed

Allowing for multiple MX records #70

TheNoButton opened this issue Apr 4, 2016 · 0 comments

Comments

@TheNoButton
Copy link

The grep -m1 is restricting me to only having 1 MX record resolved. I bumped it up to 5 (arbitrary). I'm not sure what would be the best generic case.

--- a/include/despf.inc.sh
+++ b/include/despf.inc.sh
@@ -81,7 +81,7 @@ dea() {
 # demx <domain>
 # Get MX record for a domain
 demx() {
-  mymx=$(mydig -t MX $1 | awk '{print $2}' | grep -m1 .)
+  mymx=$(mydig -t MX $1 | awk '{print $2}' | grep -m5 .)
   for name in $mymx; do dea $name $2; done
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant