Overview
Discover what makes Emailwiz powerful
`emailwiz` is a lightweight, self‑hosted mail stack designed for developers who prefer a minimal, Unix‑centric environment over bloated webmail suites. At its core the script provisions an SMTP/IMAP service powered by **Postfix** and **Dovecot**, respectively, while wiring them together with secure authentication via PAM. The stack is intentionally *stateless* in terms of user data: mailboxes are mapped to system users, eliminating the need for a dedicated SQL database and simplifying backup/restore workflows.
Postfix
Dovecot
OpenDKIM
SpamAssassin
Overview
emailwiz is a lightweight, self‑hosted mail stack designed for developers who prefer a minimal, Unix‑centric environment over bloated webmail suites. At its core the script provisions an SMTP/IMAP service powered by Postfix and Dovecot, respectively, while wiring them together with secure authentication via PAM. The stack is intentionally stateless in terms of user data: mailboxes are mapped to system users, eliminating the need for a dedicated SQL database and simplifying backup/restore workflows.
Technical Stack & Architecture
- Postfix – the MTA responsible for accepting inbound mail on ports 25/465/587, performing SPF/DKIM checks, and routing to local delivery agents.
- Dovecot – the IMAP/POP3 server that presents user mailboxes to clients such as Thunderbird, K‑9, or command‑line tools.
- OpenDKIM – provides domain signing to improve deliverability and integrates with Postfix via a shared socket.
- SpamAssassin – runs as a content filter, exposing a local API that developers can hook into for custom scoring rules.
- Certbot – automates the acquisition of Let’s Encrypt TLS certificates for
mail.yourdomain.tld. - fail2ban – protects all services by monitoring logs and banning IPs that exhibit suspicious behavior.
The script orchestrates configuration files for each component, ensuring tight coupling: Postfix uses Dovecot’s auth socket for authentication, and DKIM signing is applied before the message exits the server. All services run under their own systemd units, allowing fine‑grained control and easy integration with container runtimes.
Core Capabilities & APIs
- PAM‑based authentication: developers can plug in any PAM module (e.g., LDAP, GSSAPI) without touching the mail stack.
- SMTP/IMAP over TLS: full support for STARTTLS and SMTPS, with automatic certificate renewal via Certbot.
- DKIM signing & verification: the public key is published as a TXT record (
mail._domainkey) and can be rotated programmatically. - SpamAssassin API: exposes a
http://localhost:7835/endpoint for score queries, enabling custom dashboards or automated rule updates. - fail2ban filters: pre‑configured jails for Postfix, Dovecot, and SpamAssassin that can be extended with custom regex patterns.
While the script does not ship a webmail interface, it includes guidance for integrating third‑party clients like Rainloop or Roundcube if a UI is desired.
Deployment & Infrastructure
emailwiz targets Debian/Ubuntu servers, but the components are available on most Linux distributions. The script opens necessary ports (25, 587, 993, 995) and optionally provides a self‑signed cert for isolated environments. For containerization, each service can be packaged into its own Docker image; the script’s configuration files are small and portable, making it straightforward to compose a multi‑container deployment with Docker Compose or Kubernetes. Scaling horizontally is achievable by adding more SMTP relay nodes and using a shared NFS or object store for mail storage, though the default setup is intended for single‑node deployments.
Integration & Extensibility
- DNS record automation: the script outputs MX, SPF, DMARC, and DKIM TXT records, simplifying domain authentication.
- Custom filter hooks: developers can drop
.cffiles into SpamAssassin’slocal.ddirectory to add rules. - PAM modules: swap authentication backends by changing
/etc/pam.d/dovecotand/etc/postfix/main.cf. - Webhooks: while not built in, Postfix’s
header_checksandmime_filtercan be used to trigger external scripts on message receipt or send.
The modular nature of the stack encourages experimentation: replace Postfix with Exim, swap Dovecot for Courier, or integrate a mail‑archiving service without touching the core script.
Developer Experience & Community
The project’s README is concise yet thorough, outlining prerequisites, DNS requirements, and post‑install steps. Documentation is hosted on GitHub with clear sections for troubleshooting and advanced configuration. Community support is modest but active; the author maintains a mailing list and responds to issues promptly. Licensing is permissive (MIT), allowing commercial use without royalties.
Use Cases
- Private domain email for small teams – no need for a full‑featured webmail; clients can use native mail apps.
- IoT notification hub – the isolated, self‑signed mode is ideal for sending logs or alerts from devices on a VPN.
- Educational labs – students learn SMTP/IMAP internals without the overhead of a GUI interface.
- Custom mail processors – developers can hook SpamAssassin or DKIM into automated workflows (e.g., webhook‑based ticketing).
Advantages Over Alternatives
- Zero database overhead – eliminates SQL tuning and backup complexity.
- High deliverability out of the box – built‑in DKIM/SPF/DMARC support with automatic certs.
- Lightweight footprint – suitable for low‑resource VPS or edge devices.
- Open‑source, permissive license – no licensing costs for commercial deployments.
In summary, emailwiz offers a developer‑friendly, fully functional mail server that prioritizes security, configurability, and minimalism. It is an
Open SourceReady to get started?
Join the community and start self-hosting Emailwiz today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
Joomla!
Build dynamic websites and web applications
OpenSign
Free, secure PDF e‑signature for every workflow
HumHub
Modular social intranet for teams and communities
FileGator
Web‑based file manager for self‑hosted environments
AppFlowy
AI-powered workspace for notes, projects, and wikis
RSSMonster
Web‑based RSS aggregator with Google Reader style