Next-Generation Email Platform
Traditional IMAP/SMTP meets Web3 protocols with powerful MailScript filtering
Complete Email Solution
Traditional Email
Full support for IMAP, POP3, SMTP, Gmail, and Outlook with OAuth2 authentication
Web3 Protocols
AfterSMTP with DID-based identity and Mailblocks with proof-of-stake spam prevention
Legacy Import
Seamlessly migrate from Pine, Mutt, Thunderbird with mbox/maildir support
Security Testing
Comprehensive SPF, DKIM, DMARC, MTA-STS, BIMI, and ARC verification
Protocol Debugging
Interactive SMTP/IMAP/POP3 grammar testing and compliance verification
Smart Filtering
Powerful MailScript engine with Starlark-based rule processing
MailScript: Enterprise Mail Filtering for Everyone
Powerful Starlark-based email filtering engine that runs anywhere
๐ Standalone Binary
Run MailScript independently without AfterMail. Perfect for servers, CI/CD pipelines, and custom integrations.
# Test mail filtering rules
mailscript test --script=filter.star
# Process mailboxes
mailscript process --mbox=inbox.mbox
๐ข Bring to Your Systems
Integrate AfterMail's enterprise-grade filtering technology into your own email infrastructure.
# JSON output for automation
mailscript process --json > results.json
# Live daemon integration
mailscript daemon monitor
๐งช Offline Testing
Test and debug filtering rules before deploying to production. Interactive REPL for rapid development.
# Interactive development
mailscript repl --script=rules.star
# Process local mailboxes
mailscript process --maildir=~/Maildir
MailScript Use Cases
๐ง Email Service Providers
Integrate MailScript into your email infrastructure for advanced spam filtering, content policy enforcement, and compliance rules. Process millions of messages with battle-tested Starlark engine.
๐๏ธ DevOps & Testing
Validate mail filtering rules in CI/CD pipelines. Test against sample mailboxes before production deployment. JSON output integrates seamlessly with automation tools.
๐ Security Research
Analyze spam patterns, phishing attempts, and malicious emails. Process archived mailboxes with custom detection rules. Export results for threat intelligence.
๐ Education & Training
Teach email security, spam filtering, and protocol analysis. Students can test rules offline, process sample datasets, and learn mail filtering without production risks.
๐ Mail Migration
Process and filter mailboxes during migrations. Apply custom rules to clean up legacy data. Compatible with mbox, maildir, and AfterMail formats.
Getting Started
Download AfterMail
git clone https://github.com/afterdarksys/aftermail.git
cd aftermail
go build -o aftermail .
Build MailScript Standalone
go build -o mailscript ./cmd/mailscript
Import Legacy Mailboxes
# Import from Pine/Mutt
aftermail legacy --migrate=/var/mail/user --type=mbox
# Auto-scan common locations
aftermail legacy --auto-scan
Process with MailScript
# Test your filtering rules
mailscript test --script=spam-filter.star
# Process a mailbox
mailscript process --script=filter.star --mbox=inbox.mbox -v