Information Gatheringemaildnssmtpsecurityscannerblacklistdkimdmarc

mxcheck

mxcheck is an info and security scanner for e-mail servers. It checks DNS records, blacklists, open relays, TLS support, and more.

Description

mxcheck is designed to scan e-mail servers for security and configuration issues. It provides comprehensive checks on DNS records including A, MX, PTR, SPF, MTA-STS, DKIM, and DMARC, as well as AS number and country information. The tool also verifies support for StartTLS and certificate validity, scans open ports 25, 465, and 587, detects blacklist listings, identifies information leaks via server strings and VRFY commands, and tests for open relays.

Use cases include reconnaissance of target mail servers during penetration testing, verifying email infrastructure security, and auditing for common misconfigurations that could lead to abuse or spam. It helps security professionals assess exposure to blacklisting and relay vulnerabilities.

The tool is lightweight with an installed size of 6.53 MB and depends only on libc6, making it easy to deploy on Kali Linux systems.

How It Works

mxcheck performs DNS queries for records like A, MX, PTR, SPF, MTA-STS, DKIM, and DMARC using a specified DNS server (default 8.8.8.8). It checks AS number and country via WHOIS-like lookups. For SMTP services, it scans ports 25, 465, 587 unless disabled, tests StartTLS support and certificate validity, queries blacklists, attempts VRFY commands and server string analysis for leaks, and probes for open relay behavior using configurable mailFrom and mailTo addresses.

Installation

bash
sudo apt install mxcheck

Flags

-b, --blacklistCheck if the service is on blacklists
-p, --disable-port-scanDisable SMTP port scan
-S, --dkim-selector stringThe DKIM selector. If set a DKIM check is performed on the provided service domain
-d, --dnsserver stringThe dns server to be requested (default "8.8.8.8")
-f, --mailfrom stringSet the mailFrom address (default "[email protected]")
-t, --mailto stringSet the mailTo address (default "[email protected]")
-n, --no-promptAnswer yes to all questions
-s, --service stringThe service host to check

Examples

Display usage help and available flags
mxcheck -h
Check the service host example.com with default settings
mxcheck -s example.com
Check example.com and verify if listed on blacklists
mxcheck -s example.com -b
Check example.com with SMTP port scan disabled
mxcheck -s example.com -p
Check example.com and perform DKIM check with specified selector
mxcheck -s example.com -S selector1
Check example.com using custom DNS server 1.1.1.1
mxcheck -s example.com -d 1.1.1.1
Check example.com with custom mailFrom and mailTo addresses
mxcheck -s example.com -f test@example.com -t user@example.com
Check example.com without prompts, auto-answering yes
mxcheck -s example.com -n
Updated 2026-04-16kali.org ↗