SQL-based storage backend for go-imap and go-smtp (not yet) libraries.
Go 1.11 is required because we are using modules. Things may work on older versions but these configurations will not be supported.
go-sqlmail is known to work with (and constantly being tested against) following RDBMS:
- SQLite 3.25.0
- MySQL 5.7 (or MariaDB 10.2)
- PostgreSQL 9.6
Note: MySQL 5.7 support is deprecated since it's addition and not even strictly safe to use. Please stick to using newer versions (MySQL 8 or compatible MariaDB version) when possible.
Due to go-imap architecture, some extensions require support from used backend. Here are extensions supported by go-sqlmail:
- CHILDREN
APPEND-LIMIT(planned)UIDPLUS(planned)- MOVE
IDLE(planned)
You can try go-sqlmail as part of maddy mail server. Currently it is not merged into upstream yet so here is where you should get code from: https://github.com/foxcpp/maddy/tree/sqlmail
You need to execute this command prior to building to get lastest development version:
go get github.com/foxcpp/go-sqlmail@dev
Here is minimal example for testing, using SQLite (you need CGo for SQLite!):
imap://127.0.0.1:1993 {
sql sqlite3 maddy.db
insecureauth
}