No description
- Go 99.3%
- HTML 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| cmd/smtp-relay-managerd | ||
| configs | ||
| internal | ||
| web | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| SPEC.md | ||
smtp-relay-manager
A Postfix/Dovecot-backed SMTP submission relay whose accounts, domains, and TLS policy are managed through a small REST API instead of hand-edited config files. See SPEC.md for the full design.
Layout
cmd/smtp-relay-managerd— the daemon (REST API only; Postfix/Dovecot/OpenDKIM run alongside it as separate system services).internal/store— SQLite-backed accounts/domains/config.internal/api— the bearer-key REST API (SPEC.md §3).internal/dkim— per-domain RSA key pairs and OpenDKIM KeyTable/SigningTable.internal/tlspolicy— allow-list validation forPUT /config/tls.internal/tlsapply— runs thepostconf/systemctlcommands that apply it live.web/index.html— the static informational front page (SPEC.md §5).configs/— Postfix/Dovecot/OpenDKIM/sudoers config fragments, documentation for deployers (SPEC.md §8), not applied automatically.
Build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./cmd/smtp-relay-managerd
Test
CGO_ENABLED=0 go test ./...
Run
SMTP_RELAY_BEARER_KEY=... ./smtp-relay-managerd \
-listen 127.0.0.1:8080 \
-db /var/lib/smtp-relay-manager/relay.db \
-dkim-key-dir /var/lib/smtp-relay-manager/dkim \
-dkim-key-table /etc/opendkim/KeyTable \
-dkim-signing-table /etc/opendkim/SigningTable