feat: 重构配置文件格式并添加 IMAP ID 命令支持

- 配置文件分离:用户配置与项目配置分离,项目级配置(客户端信息、需要 ID 命令的 provider)放在代码中
- 新增 check_id 字段:用户可选择禁用单个账户的 ID 命令发送
- 简化 provider:只保留 163 和 QQ,移除未使用的 Gmail/Outlook/188 等
- 修复 163 邮箱收件箱问题:通过发送 IMAP ID 命令解决 Unsafe Login 错误

BREAKING CHANGE: 配置文件格式变化,旧配置不兼容
This commit is contained in:
2026-04-10 00:39:06 +08:00
parent d54fd01001
commit 52c5eb5ae8
7 changed files with 334 additions and 200 deletions

View File

@@ -156,17 +156,17 @@ func runOnboarding() error {
}
cfg := Config{
From: email,
From: FromConfig{Account: accountName},
Signature: "",
UnsafeHTML: unsafeHTML,
Defaults: DefaultsConfig{Encryption: smtpEncryption},
Accounts: []Account{
{
Name: accountName,
Email: email,
Provider: provider,
Username: smtpUsername,
Password: smtpPassword,
SMTPEncryption: smtpEncryption,
Name: accountName,
Email: email,
Provider: provider,
Username: smtpUsername,
Password: smtpPassword,
IMAP: IMAPConfig{
Host: imapHost,
Password: smtpPassword,