sam
f4787a819d
feat: email channel + Channel interface with config schema validation
Email channel (internal/channels/email):
- SMTP server receiving inbound emails on configurable port
- Multipart body extraction (text/plain from MIME)
- SMTP relay for outbound replies with STARTTLS + AUTH
- 8 tests, race-clean
Channel interface (internal/channels/channel.go):
- ConfigSchema() — JSON Schema for channel configuration
- ValidateConfig() — validates channel-specific config at startup
- All three channels (Telegram, Email, Webhook) implement it
- Compile-time guard: var _ channels.Channel = (*Gateway)(nil)
Config: ChatConfig.Email added (listen_addr, relay_addr).
Daemon: email gateway wired into main.go behind chat.email block.
40 packages pass with -race.