Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 1.72 KB

File metadata and controls

74 lines (52 loc) · 1.72 KB

MailScan

A simple Python tool to analyze email security configuration for any domain — one at a time or in bulk across a list of domains.

What it checks

  • SPF - Sender Policy Framework
  • DMARC - Domain-based Message Authentication, Reporting & Conformance
  • DKIM - DomainKeys Identified Mail
  • MX - Mail Exchange records
  • MTA-STS - Mail Transfer Agent Strict Transport Security
  • TLS-RPT - TLS Reporting
  • BIMI - Brand Indicators for Message Identification

Installation

# Install dnspython directly
pip3 install dnspython

# Or create a venv first
python3 -m venv .mailscanvenv
source .mailscanvenv/bin/activate
pip3 install dnspython

Usage

Single domain

# Risk analysis (default)
python3 mailscan.py example.com

# DNS records only
python3 mailscan.py example.com --records

# Both risk analysis and records
python3 mailscan.py example.com --both

Bulk mode — scan a file of domains

Pass a file containing one domain per line with -f. Lines starting with # are treated as comments and ignored.

# domains.txt
example.com
test.com
# this line is ignored
another.com
# Findings grouped by issue (default)
python3 mailscan.py -f domains.txt

# DNS records for each domain
python3 mailscan.py -f domains.txt --records

# Grouped findings + per-domain records
python3 mailscan.py -f domains.txt --both

Bulk mode scans all domains concurrently and groups findings by issue rather than by domain, so you can immediately see which problems are widespread and which are isolated. A domain risk score summary is printed at the end, ranked highest to lowest.

Example Output

Example output

Requirements

  • Python 3.6+
  • dnspython