💻 Software
How do I get the mx records for a domain from *nix command line?
Fresh7 days ago
Mar 15, 202644745 viewsConfidence Score1%
1%
Problem
What is the best way to lookup MX records for a domain from the command line?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How do I get the mx records for a domain from *nix command line?
Low Risk
Here are 4 options, in order from least to most verbose: (Thanks to bortzmeyer for suggesting .) The difference is largely a matter of personal preference and what your goal is. I tend to use , but if you want full details about exactly what you're getting back from the server (e.g. because you're troubleshooting DNS), is the way to go. On the third hand, if you're doing this in a script, the output from is going to be easiest to parse.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix