chore(deploy): 优化 split stack 的 SMTP 配置

- 为 `docker-compose.stack.yml` 的 API 容器默认注入 `LANQIN_SMTP_HOST/PORT`,避免 Webmail 发信配置漂移。
- 补充 `.env.example` 和 `README`,说明 split stack 默认走 `postfix`,以及外部 SMTP 的覆盖方式。
- 新增 `sent_message_dedupe_keys` 表和相关读写逻辑,确保已发送消息去重可回收,并补充对应测试。
This commit is contained in:
LanQin_
2026-06-24 11:03:01 +08:00
parent fa450c9f9b
commit 5c9bea075a
6 changed files with 70 additions and 1 deletions
+11
View File
@@ -960,6 +960,17 @@ func TestSubmissionSentCopyDedupesByMessageID(t *testing.T) {
}
}
func TestSentMessageDedupeTableExists(t *testing.T) {
a := newTestApp(t)
var count int
if err := a.db.QueryRow(`SELECT COUNT(1) FROM sqlite_master WHERE type='table' AND name='sent_message_dedupe_keys'`).Scan(&count); err != nil {
t.Fatal(err)
}
if count != 1 {
t.Fatalf("sent message dedupe table count=%d, want 1", count)
}
}
func TestSubmissionServersAcceptStartTLSAndImplicitTLS(t *testing.T) {
a := newTestApp(t)
host, port, received := startCapturingSMTP(t, 2)