Before sending email campaigns to thousands of contacts, there's one critical question you need to answer: Will your emails actually be delivered? The most common reason for email bounce rates above 10% is simple - the domains you're sending to have invalid or misconfigured MX (Mail Exchange) records.
Our MX Record Checker solves this problem by querying DNS servers to verify that each domain has valid mail exchange records configured. This ensures you're only sending emails to domains that can actually receive them, protecting your sender reputation and saving you money on wasted email sends.
Whether you're an email marketer cleaning lists before campaigns, a sales professional validating lead quality, or a developer building email verification systems, this tool identifies undeliverable domains in seconds instead of waiting for bounce reports days later.
What is an MX Record Checker?
An MX Record Checker is a DNS validation tool that queries domain name servers to retrieve Mail Exchange (MX) records - the DNS entries that specify which mail servers are responsible for accepting email on behalf of a domain. When you send an email to user@example.com, email servers first look up example.com's MX records to know where to deliver the message.
How it works: The script performs DNS queries using Python's dnspython library, retrieves all MX records for a domain, sorts them by priority (lower numbers indicate higher priority), validates the response to ensure records exist and are properly formatted, and generates detailed reports showing each mail server and its configuration.
What makes this tool unique is its ability to process thousands of domains in minutes with parallel DNS queries, detect common misconfigurations like missing or circular MX records, provide actionable insights about mail server priorities and backup servers, and export results in CSV format for easy integration with your email platform or CRM.
Key Features
Complete MX Resolution
Retrieves all MX records for each domain including primary and backup mail servers. Shows priority values to understand mail routing hierarchy.
Bulk Domain Validation
Process thousands of domains from CSV files with parallel DNS queries. Validates 100+ domains per second on average hardware.
Error Detection
Identifies common issues like NXDOMAIN (domain doesn't exist), SERVFAIL (DNS server errors), and TIMEOUT (slow DNS responses).
Priority Sorting
Automatically sorts MX records by priority value. Helps understand which server handles incoming mail first and backup server failover order.
CSV Export
Export validation results to CSV with domain, status, MX records, and priority values. Ready to import into your email platform.
Detailed Reports
Generate summary statistics showing valid domains, invalid domains, domains with multiple MX records, and average DNS response time.
How to Use - Step by Step Guide
Prerequisites
- Python 3.7 or higher installed on your system
- dnspython library: Install with
pip install dnspython - List of domains to validate (text file or CSV)
- Active internet connection for DNS queries
Step 1: Download the Script
Enter your details in the download form on the right sidebar. You'll receive instant access to the complete Python script with full error handling, progress tracking, and export functionality.
Step 2: Prepare Your Domain List
Create a text file or CSV with one domain per line. The script accepts various formats:
You can also extract domains from email addresses - the script automatically strips the email prefix and validates just the domain portion.
Step 3: Run the MX Checker
Open your terminal and execute:
For bulk processing with CSV export:
The script will:
- Load all domains from your input file
- Query DNS servers in parallel for faster processing
- Validate MX records and detect errors
- Sort records by priority for each domain
- Display real-time progress with success/failure counts
Step 4: Interpret the Results
The script outputs detailed information for each domain:
Step 5: Clean Your Email List
Use the validation results to remove invalid domains from your email lists. Domains marked as INVALID should be excluded from campaigns to maintain sender reputation and reduce bounce rates.
Code Preview
Here's a preview of the core MX checking functionality:
The complete script includes CSV import/export, progress bars, error logging, and configurable timeout settings. Download it to get the full-featured version.
Real-World Use Cases
1. Pre-Campaign Email List Validation
Scenario: You're launching a cold email campaign to 10,000 B2B prospects. Your email service provider charges per email sent and penalizes accounts with bounce rates above 5%.
Solution: Run your entire prospect list through the MX checker before importing to your ESP. In one real-world case, a user validated 10,000 domains and found 1,200 (12%) had invalid or missing MX records, saving $600 in sending costs and protecting their sender reputation.
2. Lead Quality Verification
Scenario: Your sales team buys lead lists from third-party providers, but you suspect many emails are fake or expired.
Solution: Validate all domains before adding leads to your CRM. One sales team discovered that 30% of purchased leads had non-existent domains, helping them negotiate refunds from lead vendors and establish quality requirements for future purchases.
3. Website Form Validation
Scenario: Users submit email addresses to your contact form, but many bounce when you try to reply. You need to catch invalid domains at submission time.
Solution: Integrate MX checking into your form validation logic. Check the domain's MX records before accepting the submission. This reduces fake signups by 40% and improves your email deliverability for genuine contacts.
4. Email Deliverability Monitoring
Scenario: You maintain a large subscriber database and want to identify domains that may have delivery issues before sending campaigns.
Solution: Schedule weekly MX validation on your entire database. Monitor domains that transition from valid to invalid - these may indicate business closures or server migrations. One e-commerce company reduced bounce rates from 8% to under 2% with automated weekly validation.
Technical Requirements & Specifications
System Requirements
- Operating System: Windows 7+, macOS 10.12+, Linux (any modern distro)
- Python Version: Python 3.7 or higher (Python 3.9+ recommended)
- Dependencies: dnspython (install via: pip install dnspython)
- RAM: 512MB minimum (for processing 100K+ domains)
- Network: Stable internet connection for DNS queries
DNS Query Configuration
- Default timeout: 5 seconds per query
- Retry attempts: 3 (for handling transient DNS failures)
- Supported DNS servers: Public resolvers (Google 8.8.8.8, Cloudflare 1.1.1.1) or custom
- Query type: MX (Mail Exchange) records
Performance Specifications
- Processing speed: 50-100 domains/second with parallel queries
- Batch size: Unlimited (tested with 1M+ domains)
- Thread pool: Configurable (default 50 concurrent threads)
- Memory usage: ~1MB per 1000 domains
Output Formats
- Console: Real-time colored output with progress tracking
- CSV: Domain, Status, MX Count, MX Records, Priority Values
- JSON: Structured data for API integration
- Log files: Detailed error logs for troubleshooting
Frequently Asked Questions
Related Email Tools
Enhance your email validation workflow with these complementary tools: