A modern on-premise open source email server.
- On-premise, cloud-managed
- Operator-less storage and live snapshots
- Effortless migration
- Project goals (elaborated)
- What about SpamAssassin?
- What about Roundcube?
$ make
$ make generate
$ make
$ make check
$ make
$ cd $GOPATH/bin
$ ./on-prem-emaild
2019/09/22 02:05:25 INFO Opened database /.../on-prem-emaild.db
2019/09/22 02:05:25 DEBUG Ensuring indexes
2019/09/22 02:05:25 INFO Listening for IMAP4rev1 on :8143
2019/09/22 02:05:25 DEBUG Connected to wss://api.on-prem.net/v1/agentStream
2019/09/22 02:05:25 INFO On-Prem Email Server started
2019/09/22 02:05:25 INFO Node id is bm3jict5jj84bcnaud40
Then visit the Admin Portal at https://console.on-prem.net.
Begin by cloning, building, and running the On-Prem Admin Portal API Server:
$ git clone [email protected]:on-prem-net/email-api.git
...
$ make
$ cd $GOPATH/bin
$ ./email-api
2019/09/22 01:56:10 INFO Attached to MySQL
2019/09/22 01:56:10 INFO Completed migrations
2019/09/22 01:56:10 INFO Attached to Redis at localhost:6379
2019/09/22 01:56:10 INFO Listening for http on port 3000
2019/09/22 01:56:10 INFO On-Prem Admin API started
Then start the email server in this project with:
$ make
$ cd $GOPATH/bin
$ API_URL=http://localhost:3000 ./on-prem-emaild
2019/09/22 02:05:25 INFO Opened database /.../on-prem-emaild.db
2019/09/22 02:05:25 DEBUG Ensuring indexes
2019/09/22 02:05:25 INFO Listening for IMAP4rev1 on :8143
2019/09/22 02:05:25 DEBUG Connected to ws://localhost:3000/v1/agentStream
2019/09/22 02:05:25 INFO On-Prem Email Server started
2019/09/22 02:05:25 INFO Node id is bm3jict5jj84bcnaud40
Finally, clone and run the On-Prem Email Console, and login:
$ git clone [email protected]:on-prem-net/email-console.git
$ cd email_console
$ npm install
$ ember serve --proxy=http://localhost:3000
Proxying to http://localhost:3000
Build successful (8113ms) – Serving on http://localhost:4200/
After logging in with the default credentials of admin
and password
, you'll be prompted to the effect that you haven't registered any agents yet.
Claim the running emaild agent by finding its node id in its startup log, and entering it into the admin ui:
Finally, once the agent is selected, go to the marketplace, find the email service offering, select the free plan, and launch it to create a service instance and site configuration for your agent.
These steps will build an RPM in your current working directory.
$ docker build -f rpm.Dockerfile \
--build-arg VERSION=0.1.0 \
--build-arg ITERATION=0 \
-t scratch .
$ docker run -v `pwd`:/output -it scratch
'on-prem-emaild-0.1.0-0.x86_64.rpm' -> '/output/on-prem-emaild-0.1.0-0.x86_64.rpm'
The BoltDB and BadgerDB storage engines are supported, with BoltDB currently being the hard-coded default. Genji is used as a layer above the storage engines to manage secondary indexes, and provides a data access interface.
The email server is configuration-free (no local config files, no local operator interface), and obtains its configuration updates from the Email API Server. A Websocket connection is maintained, and protobuf messages are exchanged using a request-response handshake involving request id's.