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.3.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.3.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mail_ops_scripts-2.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 98352880d8e30350bd3e9661be60da65acacb9102efe9eee7459533708190ff2
MD5 40fe63fb22e7ae0d4eebd064bde4d330
BLAKE2b-256 c52c1bad8cb25895983c798719cd5cc895019ea2f4d93f51b6ba9a3b79d3b86b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mail_ops_scripts-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a681d5e98101ad730db4435945e467682c23a4e4bd464d8b99c6b8e9170c5f5f
MD5 21c4667e991df4a9fbb71e4fcb6414ce
BLAKE2b-256 a3226def6f10e2673931007d4f09a1879db70443410bcc63e76aa68614fce68e

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