Next-Generation Email Platform - Supporting traditional protocols AND cutting-edge Web3/blockchain-backed messaging.
AfterMail is a comprehensive email platform that bridges traditional email (IMAP, Gmail, Outlook) with next-generation protocols (AfterSMTP, Mailblocks). It's both a protocol debugging tool AND a full-featured email client with first-class support for encrypted, blockchain-verified messaging.
Most Web3 projects fail because they require users to abandon existing systems. AfterMail takes a different approach:
- Download for traditional email - Works perfectly with Gmail, Outlook, any IMAP server
- Discover advanced features - Built-in migration wizard, protocol testing, security verification
- Graduate to Web3 - When ready, use AfterSMTP/Mailblocks for encrypted DID-based messaging
- Keep both - Traditional and Web3 email coexist in one unified interface
This gives AfterSMTP and Mailblocks a real product with actual users, not just a token and whitepaper.
- IMAP/POP3/SMTP - Standard email protocols
- Gmail Integration - OAuth2 authentication, Gmail API support
- Outlook Integration - Microsoft Graph API for Outlook.com and Microsoft 365
- Folder Management - Inbox, Sent, Trash, custom folders
- Attachments - Full support for file attachments
- DID-Based Identity - No more passwords!
did:aftersmtp:msgs.global:username - End-to-End Encryption - X25519 + AES-GCM-256 encryption
- Cryptographic Signatures - Ed25519 signatures, blockchain-backed verification
- Modern Message Format (AMF) - Replaces legacy MIME with clean Protobuf structure
- Proof of Transit - Every message recorded on Substrate blockchain
- QUIC Transport - 0-RTT latency, faster than traditional SMTP
- msgs.global Client - Connect to the free public AfterSMTP gateway
- Proof-of-Stake Spam Prevention - Senders stake ETH to reach your inbox
- IPFS Storage - Distributed message storage
- Quarantine System - Review staked emails before accepting
- Wallet Integration - Ethereum wallet support
- Grammar Testing - SMTP, IMAP, POP3 compliance checks
- Security Verification - SPF, DKIM, DMARC, MTA-STS, BIMI, ARC
- Raw Session Debugging - Interactive protocol sessions
- Message Inspector - Parse and analyze both MIME and AMF messages
- AfterSMTP Gateway Testing - gRPC connection testing, DID verification
- Migration Wizard - Step-by-step guide to migrate from Gmail/Outlook to AfterSMTP
- Bulk Import - Import thousands of messages preserving metadata
- Format Conversion - Automatic MIME β AMF conversion
- Contact Migration - (Coming soon)
MIME (Traditional):
From: sender@example.com
To: recipient@example.com
Subject: Hello
Content-Type: text/plain
Message body here
AMF (AfterSMTP):
message AMFPayload {
string subject = 1;
string text_body = 2;
string html_body = 3;
repeated Attachment attachments = 4;
map<string, string> extended_headers = 5;
}Benefits of AMF over MIME:
- β Native binary format (no base64 overhead)
- β Structured data (no complex parsing)
- β Hash verification for attachments
- β Clean separation of headers and body
- β Extensible with custom headers
AfterMail supports 7 account types:
| Type | Protocol | Authentication | Use Case |
|---|---|---|---|
| IMAP | IMAP/SMTP | Username/Password | Traditional mail servers |
| POP3 | POP3/SMTP | Username/Password | Legacy systems |
| Gmail | Gmail API | OAuth2 | Google Workspace |
| Outlook | Graph API | OAuth2 | Microsoft 365 |
| msgs.global | AfterSMTP/gRPC | DID + Ed25519 | Free encrypted email |
| AfterSMTP | AfterSMTP/gRPC | DID + Ed25519 | Self-hosted gateway |
| Mailblocks | Web3 + IPFS | Ethereum Wallet | PoS email |
# Clone the repository
git clone https://github.com/afterdarksys/aftermail
cd aftermail
# Install dependencies
go mod tidy
# Build
go build -o aftermail
# Run GUI
./aftermail
# Or use CLI commands
./aftermail test smtp --host mail.example.com --port 25
./aftermail verify example.com
./aftermail amp send --target did:aftersmtp:msgs.global:alice --payload "Hello!"- Go to Google Cloud Console
- Create OAuth2 credentials
- Add to AfterMail: Tools β Manage Accounts β Add Gmail Account
- Authenticate via OAuth
-
Get a DID identity:
- Use Migration Wizard (Tools β Migration Wizard)
- Or CLI:
./aftermail register --username yourname
-
Keys are automatically generated:
- Ed25519 signing key
- X25519 encryption key
-
Connect to msgs.global or self-hosted gateway
- Connect Ethereum wallet
- Configure IPFS endpoint
- Set quarantine stake threshold
# Via CLI
./aftermail send --to user@example.com --subject "Hello" --body "Test message"
# Via GUI
Composer β Select IMAP account β Write message β Send# Via CLI
./aftermail amp send \
--did did:aftersmtp:msgs.global:ryan \
--target did:aftersmtp:msgs.global:alice \
--payload "Encrypted message"
# Via GUI
Composer β Select AfterSMTP account β Enter DID β Write message β Send# Via GUI: Tools β Migration Wizard
1. Authenticate with Gmail
2. Create/select AfterSMTP DID
3. Select folders to migrate
4. Run migration (converts MIME β AMF automatically)# Via GUI: Protocol Inspector β Inspect Message
# Paste MIME or AMF hex β Auto-detects format β Shows parsed structure| Feature | SMTP/MIME | AfterSMTP/AMF | Mailblocks |
|---|---|---|---|
| Encryption | TLS only (transport) | E2E (X25519+AES) | E2E + IPFS |
| Signatures | DKIM (optional) | Ed25519 (required) | Blockchain |
| Identity | Email address | DID (blockchain) | Ethereum address |
| Spam Prevention | Filters | DID reputation | Proof-of-stake |
| Format | Text (MIME) | Protobuf (AMF) | Protobuf + IPFS |
| Storage | Centralized | Gateway-based | IPFS |
| Proof of Delivery | Bounce messages | Blockchain receipt | Smart contract |
aftermail/
βββ cmd/ # CLI commands
β βββ root.go # Main command
β βββ test.go # Protocol testing
β βββ verify.go # Security verification
β βββ amp.go # AfterSMTP commands
β βββ web3.go # Mailblocks commands
βββ internal/
β βββ gui/ # Fyne GUI components
β β βββ gui.go # Main window
β β βββ composer.go # Email composer
β β βββ folders.go # Folder/inbox view
β β βββ amfviewer.go # AMF message viewer
β β βββ migration.go # Migration wizard
β β βββ protocol.go # Protocol inspector
β βββ daemonapi/ # Background daemon
βββ pkg/
βββ accounts/ # Account management
β βββ types.go # Account/Message types
β βββ gmail.go # Gmail OAuth client
β βββ outlook.go # Outlook Graph client
β βββ msgsglobal.go # AfterSMTP client
βββ amp/ # AfterSMTP client library
βββ web3mail/ # Mailblocks client library
βββ security/ # SPF/DKIM/DMARC verification
βββ smtp/ # SMTP testing
βββ imap/ # IMAP testing
βββ pop3/ # POP3 testing
# Install Go 1.21+
go version
# Install dependencies
go mod download
# Build for your platform
go build -o aftermail
# Build for all platforms
GOOS=windows GOARCH=amd64 go build -o aftermail.exe
GOOS=darwin GOARCH=amd64 go build -o aftermail-mac
GOOS=linux GOARCH=amd64 go build -o aftermail-linux- β Traditional IMAP/POP3/SMTP support
- β Gmail OAuth integration
- β Outlook Graph API integration
- β AfterSMTP AMP client (msgs.global)
- β Mailblocks Web3 client
- β Migration wizard
- β Protocol testing tools
- β AMF message viewer
- β¬ Contact management and migration
- β¬ Attachment encryption for AMF
- β¬ Calendar integration
- β¬ Push notifications
- β¬ Mobile apps (React Native with AMP support)
- β¬ Full HTML email rendering
- β¬ PGP compatibility layer
- β¬ Multi-signature workflows
- β¬ Smart contract triggered emails
- β¬ Decentralized group messaging
We welcome contributions! This project bridges traditional email and Web3 - opportunities exist in:
- Protocol implementations
- UI/UX improvements
- Security audits
- Documentation
- Testing
- Client libraries for other languages
Report security vulnerabilities to: security@aftermail.dev
- Ed25519 - Message signatures (libsodium)
- X25519 - Key exchange (libsodium)
- AES-GCM-256 - Payload encryption
- TLS 1.3 - Transport security
- DANE - Certificate pinning
Private keys are stored encrypted at rest using OS keychain:
- macOS: Keychain Access
- Windows: DPAPI
- Linux: Secret Service API
MIT License - See LICENSE file
Built with:
- Fyne - Cross-platform GUI
- Cobra - CLI framework
- AfterSMTP - AMP protocol
- go-imap - IMAP client
- go-msgauth - DKIM/SPF/DMARC
Next-Generation Email Platform π§
For support, visit: https://aftermail.dev