First split into crockery init and crockery run

The init command creates a crockery.db file containing the domain name and
TLS keypair. The run command starts IMAP and SMTP services based on that file.

Supporting only a single domain is starting to look a bit unnecessary. We'll
see how that goes.
This commit is contained in:
2018-03-05 22:29:31 +00:00
parent bf1ca421aa
commit 3ad8c6f59f
313 changed files with 160897 additions and 43 deletions

View File

@@ -1,5 +1,7 @@
# Crockery design
## Overview
We need:
* SMTP server
@@ -18,4 +20,23 @@ We need:
* Search emails - some sort of inverted index necessary
* https://github.com/blevesearch/bleve ?
* Embedded database best. Ideally we have a single file to work with
* https://github.com/coreos/bbolt
* https://github.com/asdine/storm
## Database structure
```
config/
domain: "example.com"
domains/
example.com/
accounts/
foo@example.com/
config/
emails/
config/
key: []byte(...)
cert: []byte(...)
```