Kojo
Kojo (工場) is the Japanese word for “factory”, and that is exactly what Kojo is: a factory for modern, secure, high-performance, self-hosted email systems.
Kojo has two parts that work together.
The factory
The factory is a Python program that configures a set of daemons to operate as a complete and very secure email system that scales to thousands of users. It generates dozens of configuration files for all of the daemons and ensures that every file is compatible with the others, so the daemons interoperate seamlessly to provide fully integrated, secure-by-default email services.
These are the projects whose daemons it configures:
| Project | Role | Website |
|---|---|---|
| Postfix | Mail transport (SMTP): sends and receives email | postfix.org |
| Dovecot | Mailbox storage and access (IMAP) | dovecot.org |
| OpenLDAP | Directory holding the user accounts | openldap.org |
| Rspamd | Spam filtering | rspamd.com |
| ClamAV | Antivirus scanning, automatic updates of virus signatures, and the connection to Postfix | clamav.net |
| DCC | Bulk-mail detection with the Distributed Checksum Clearinghouses | rhyolite.com/dcc |
| SOGo | Webmail, calendar and contacts | sogo.nu |
| nginx | Web server | nginx.org |
| PostgreSQL | Database | postgresql.org |
| Redis | In-memory data store | redis.io |
| Memcached | In-memory cache | memcached.org |
| Yumei | TLS certificates | Project page |
| Antei | Daemon monitoring | Project page |
| Kojo Dashboard | Web-based management of the system and its users | See below |
How the daemons fit together
The diagram below shows how the daemons of a Kojo email system communicate. Mail ports are colour-coded by encryption: green ports are always encrypted, yellow ports are sometimes encrypted (depending on the other SMTP server’s encryption capability), and red ports are never encrypted (Let’s Encrypt requires unencrypted HTTP).
The Kojo Dashboard
The Kojo Dashboard is a web-based interface for managing the email system and its users. Administrators manage accounts from the Kojo Dashboard, and users sign in to change their own passwords.
- Multiple domains: it manages email accounts across multiple domains.
- Integrated LDAP front end: provides an intuitive interface to Kojo’s OpenLDAP user database for managing thousands of users.
- System health at a glance: it gives administrators an overview of the email system’s health and status.
- Multiple views of users: administrators can view users by domain, by country and by location.
Self-hosted by design
Kojo runs on FreeBSD, on your own hardware. Your data and communications are never shared with third parties.