Skip to main content

A unified operational toolkit for email server administration and DMARC analysis.

Project description

mail ops scripts project logo

Mail Ops Scripts

CI Code style: black Imports: isort License: MIT Python 3.8+

A unified operational toolkit for email server administration, security analysis, and reporting.

🚀 COMMANDS STATUS

Command Status Tech
mailops dkim example.com FULLY LIVE OpenSSL key generation
mailops spf google.com FULLY LIVE Google DNS-over-HTTPS
mailops report --alerts FILE READY DMARC XML parsing
mailops fetch --user... CREDS READY IMAPlib + Gmail/Outlook

✅ LIVE = Real code executing (DKIM keys generated, SPF DNS lookups, XML parsing) ⏳ TODO = Structure ready but needs real implementation ❌ BROKEN = Import errors or crashes

🎯 PRODUCTION WORKFLOW

📥 1. Fetch reports          → mailops fetch --user you@gmail.com --password app-pass --days 7
📊 2. Analyze + alerts       → mailops report --alerts
🔍 3. SPF validation         → mailops spf yourdomain.com
🔑 4. DKIM key generation    → mailops dkim yourdomain.com --selector=mail

💾 Quick Start

# Clone + setup
git clone https://github.com/knowoneactual/mail-ops-scripts
cd mail-ops-scripts

# Virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# .venv/bin/Activate.ps1   # Windows PowerShell

# Install
pip install -e .

# Test
mailops --help

📋 Commands Reference

# DKIM Key Generation
mailops dkim example.com                    # default selector
mailops dkim example.com --selector=mail    # custom selector

# SPF Checking  
mailops spf google.com
mailops spf yourdomain.com

# DMARC Reports
mailops report                          # All XML files
mailops report --alerts                 # Failures only
mailops report --csv output.csv         # Export CSV

# IMAP Fetching
mailops fetch --user you@gmail.com --password app-password --days 7
mailops fetch --user user@domain.com --server imap.domain.com --days 30

🎉 Features

  • Real OpenSSL DKIM generationselector.private files
  • Google DNS-over-HTTPS SPF → Production DNS lookups
  • DMARC XML parsing → Console + CSV output
  • IMAP report fetching → Gmail/Outlook/Exchange ready
  • Global CLI install~/.local/bin/mailops
  • VS Code workflow → Python/HTML/Bash integration
  • Production ready → Error handling + help text

🛠 Development

# Dev dependencies
pip install -e '.[dev]'

# Code quality
black .
isort .
mypy .
pytest

📦 Build & Publish

pip install build twine
python -m build
twine upload dist/*

📖 Changelog

CHANGELOG.md

🤝 Contributing

CONTRIBUTING.md

📄 License

MIT


Made with ❤️ for email operations
knowoneactual/mail-ops-scripts

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mail_ops_scripts-2.2.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mail_ops_scripts-2.2.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file mail_ops_scripts-2.2.0.tar.gz.

File metadata

  • Download URL: mail_ops_scripts-2.2.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mail_ops_scripts-2.2.0.tar.gz
Algorithm Hash digest
SHA256 91ba598baa76dd8417a47a25dad9ff52ff321763caa700c56634cb5682035fbe
MD5 5b00e31f8b2f9e5af8651c7f011f4b54
BLAKE2b-256 64a96ef79122dce8454ed699d42a8978758e1d14ba980224708b551ede6a7b51

See more details on using hashes here.

File details

Details for the file mail_ops_scripts-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mail_ops_scripts-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3af6b971bcc4be7b9ae46edaa85ed4abfaf89c76d41a0abf4336272bd6bfdaf
MD5 89e8d5aa98ef72e667f37287339d22a7
BLAKE2b-256 5acf20b9f08ce267480d026cc74fc7b3297e2a1265e3e73059783a2b9ffec246

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page