Skip to main content

vamp-mail-audit

Python 3.9+ Platform License MIT VampSecure Labs

Overview

vamp-mail-audit is an email security auditor that evaluates SPF, DKIM, DMARC, MX, and active SMTP posture for one or more domains. It performs DNS-level analysis (lookup counts, policy strictness, record conflicts) plus optional live SMTP probing for STARTTLS availability, open relay conditions, and banner version disclosure. It is the email security counterpart in the VampSecure Labs toolkit, built for both point-in-time assessments and ongoing CI/CD monitoring of domain email hygiene.

Features

  • SPF analysis: presence check (HIGH if absent), duplicate TXT record detection (RFC 7208 §3.2 violation, HIGH), permissive +all/?all mechanisms (CRITICAL), softfail ~all (MEDIUM), -all pass (INFO), excessive DNS lookup count > 10 (MEDIUM)
  • DMARC analysis: presence check (HIGH if absent), p=none reporting-only policy (HIGH), p=quarantine (MEDIUM), p=reject (INFO), partial deployment pct < 100 (LOW), missing rua reporting address (LOW)
  • DKIM selector probing across 15 common selectors: default, google, mail, dkim, k1, k2, s1, s2, selector1, selector2, mandrill, mailjet, sendgrid, amazonses, smtp; key size analysis (< 1024 HIGH, 1024–2047 MEDIUM, ≥ 2048 INFO); revoked selector detection (p= empty)
  • MX record presence check (HIGH if absent)
  • Active SMTP probing (optional): STARTTLS detection, open relay test (MAIL FROM + RCPT TO external address), banner version disclosure (LOW)
  • Multi-domain batch scanning: -d/--domain repeatable, or a domain list file (-f/--file)
  • SMTP-free mode (--no-smtp) for pure DNS assessment in restricted environments
  • Export to Console (Rich), JSON, and HTML (dark-theme standalone)

Requirements

  • Python 3.9 or later
  • dnspython >= 2.4
  • rich >= 13.7.0
  • Optional: fpdf2 >= 2.7 for --report-pdf

Installation

git clone https://github.com/belky-me/vamp-mail-audit.git
cd vamp-mail-audit
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Usage

python3 vamp_mail_audit.py --help
usage: vamp_mail_audit.py [-h] [-d DOMINIO] [-f FICHERO]
                           [--mx-timeout SEG] [--no-smtp]
                           [--json FICHERO] [--html FICHERO]
                           [--client CLIENT] [--engagement ENGAGEMENT]
                           [--auditor AUDITOR] [--report-scope SCOPE]
                           [--report-html FILE] [--report-pdf FILE]

vamp-mail-audit — Email Security Auditor (VampSecure Labs)

Examples

# Audit a single domain
python3 vamp_mail_audit.py -d example.com

# Audit multiple domains in one command
python3 vamp_mail_audit.py -d example.com -d mail.example.org -d partner.io

# Audit a list of domains from file
python3 vamp_mail_audit.py -f domains.txt

# DNS-only mode (skip live SMTP probing)
python3 vamp_mail_audit.py -d example.com --no-smtp

# Custom SMTP timeout for slow MX servers
python3 vamp_mail_audit.py -d example.com --mx-timeout 30

# Export findings to JSON and HTML
python3 vamp_mail_audit.py -d example.com --json results.json --html report.html

# Generate client-ready engagement report
python3 vamp_mail_audit.py -f domains.txt \
    --client "Acme Corp" --engagement "Email Security Review Q3 2026" \
    --auditor "J. Smith" --report-html client_report.html --report-pdf client_report.pdf

CLI Reference

Flag Default Description
-d / --domain DOMAIN — Domain to audit (repeatable for batch scans)
-f / --file FILE — Text file with one domain per line (lines starting with # ignored)
--mx-timeout N 10 SMTP connection timeout in seconds
--no-smtp off Skip active SMTP probes (DNS analysis only)
--json FILE — Export results to JSON
--html FILE — Export dark-theme HTML report
--client TEXT — Client name for VSL engagement report
--engagement TEXT — Engagement title for VSL engagement report
--auditor TEXT — Auditor name for VSL engagement report
--report-scope TEXT — Scope description for VSL engagement report
--report-html FILE — Export unified VSL client report (HTML)
--report-pdf FILE — Export unified VSL client report (PDF, requires fpdf2)

Output Formats

Format Flag Description
Console (default) Rich-colored per-domain panels with SPF/DKIM/DMARC/SMTP findings
JSON --json FILE Machine-readable full result set
HTML --html FILE Dark-theme standalone report
Client HTML --report-html FILE Unified VampSecure Labs engagement report
Client PDF --report-pdf FILE PDF version of the VSL client report

Exit Codes

Code Meaning CI/CD Behavior
0 No critical or high findings Pipeline passes
1 High-severity findings detected Pipeline fails — review required
2 Critical-severity findings detected Pipeline fails — immediate action required

Use exclusively on systems you own or for which you hold explicit written authorization from the domain owner. Active SMTP probing (--no-smtp off) performs live connections to target mail servers. VampSecure Studios assumes no liability for unauthorized use.

Part of VampSecure Labs Toolkit

vamp-mail-audit is one tool in the VampSecure Labs security research toolkit. For the full toolkit including the orchestrator that runs all tools in sequence and aggregates findings into a single engagement report, see:


© VampSecure Studios — VampSecure Labs Security Research Division

Metadata

Release files for vamp-mail-audit 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vamp-mail-audit 1.1
File Size Uploaded
vamp_mail_audit-1.1.tar.gz 37.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vamp-mail-audit 1.1
File Interpreter ABI Platform
vamp_mail_audit-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 76.4 kB

Release files / vamp_mail_audit-1.1.tar.gz

Download URL vamp_mail_audit-1.1.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
083c78b3ab389226c12833f624611d47a2da0fc870c84108b0c1252fd300243c
BLAKE2b-256 checksum
How to use checksums
7983a1707e8f67a8f95946945c8d3826a8ad417d2c1437c78f81542d653e8894
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / vamp_mail_audit-1.1-py3-none-any.whl

Download URL vamp_mail_audit-1.1-py3-none-any.whl
Size 38.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1c9fe763436d98c3bf5f65649291bb3b66e8884681b139b4872770524b70dcb
BLAKE2b-256 checksum
How to use checksums
aca2ca2a58877aa7a8c9f8f621c9cd25466ccecaf892b8618ea59cecf6550d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.1 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page