Stop Using Third-Party Email: Go Native
Email is the final frontier of the self-hosted world. It is the one service that even the most battle-hardened sysadmins fear to touch. Between the arcane incantations of SPF, DKIM, and DMARC, and the constant threat of being blacklisted by the "Big Three," most developers simply surrender their privacy and their data to expensive third-party providers.
Today, we are changing that. We have officially migrated the entire ODAC mail infrastructure to Go, providing a robust, high-performance solution that makes self-hosting your own email server as easy as deploying a static site.
The Architectural "Why": Performance and Precision
When we first built mail support, it was a secondary citizen. It worked, but it was not "Enterprise-Grade." As our user base grew, we realized that the legacy implementation could not handle the concurrency and security demands of a modern cloud platform.
We chose Go for this migration for three reasons:
- Concurrency: Handling hundreds of simultaneous SMTP and IMAP connections requires a runtime that doesn't blink. Go's goroutines allow ODAC to scale mail services with minimal overhead.
- Safety: Memory safety and strict typing in Go ensure that our MIME parser is resilient against the type of buffer overflows and memory leaks that plague older mail servers.
- Zero-Bloat Binary: The entire mail engine is now a single, high-performance binary. No heavy dependencies, no massive runtime footprints. Just raw speed.

Security by Design, Not by Accident
A mail server is only as good as its security. The new ODAC mail engine features an integrated authentication layer with built-in firewall rules. We have implemented a strict RFC-compliant MIME parser that includes a recursion depth limit to prevent stack overflow attacks.
Your messages are stored in an optimized SQLite database, ensuring fast access while maintaining the "zero-config" philosophy that defines ODAC. No complex database setups are required: it just works.

Zero-Config DKIM: The End of Config Hell
The biggest hurdle to mail deliverability is DKIM (DomainKeys Identified Mail). Setting up 2048-bit keys and configuring DNS records manually is a recipe for frustration.
ODAC now handles this automatically. When you add a domain with an MX record, ODAC detects it and generates a 2048-bit RSA key pair. The public key is automatically published to your DNS settings, and the private key is securely stored for signing outbound mail. No manual intervention, no errors, just green checks on your deliverability reports.
Getting Started: From Zero to Mail in Seconds
You can set up your mail server in seconds directly from the ODAC Cloud dashboard.
- Open your dashboard at app.odac.run.
- Ensure your domain has an MX record (ODAC will warn you if it's missing).
- Create a mail account with one click.
- Connect your favorite mail client (Outlook, Gmail, or Apple Mail) using the standard SMTP and IMAP ports.
If you prefer the terminal, the ODAC CLI has you covered:
# Create a new mail account
odac mail create -e hello@example.com -p my-secure-password
The mail server listens on standard ports: 25 (STARTTLS) and 465 (Implicit TLS) for SMTP, and 143 (STARTTLS) and 993 (Implicit TLS) for IMAP.
Conclusion
Self-hosting your email should not be a weekend-long project filled with dread. By moving to a native Go implementation, we have made the ODAC mail server faster, more secure, and infinitely easier to manage.
Your data belongs to you. It is time to take it back.