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.
797 B
797 B
Crockery design
Overview
We need:
- SMTP server
- Receive emails -> middlewares -> storage
- https://github.com/emersion/go-smtp ?
- IMAP server
- Receive logins
- HTTP server
- Serve autodiscovery bumpf
- ActiveSync protocol
- Storage
- Accounts
- Passwords!
- Emails
- TLS keys + certificates
- Search emails - some sort of inverted index necessary
- Embedded database best. Ideally we have a single file to work with
- Accounts
Database structure
config/
domain: "example.com"
domains/
example.com/
accounts/
foo@example.com/
config/
emails/
config/
key: []byte(...)
cert: []byte(...)