统一邮件协议加密方式与端口联动

This commit is contained in:
xuans committed 2026-09-07 22:39:34 +08:00
1 parent 0975e26762
commit b7a4614e5b
13 files changed
+369 -118

No files matched your search

+9
View File
@@ -289,6 +289,15 @@ func CurrentMailPorts() MailPorts {
// 旧版 SMTPPort 属于发信中继,不能用作本机监听端口。
return ResolveMailPorts(SMTPSectionConfig{}, EmailSectionConfig{})
}
func CurrentMailSecurity() string {
if manager := CurrentManager(); manager != nil {
if runtime := manager.Snapshot(); runtime.Generation != 0 {
return ResolveMailSecurity(runtime.SMTP.Listener)
}
}
return MailSecurityBoth
}
func cloneHTTPConfig(source HTTPConfig) HTTPConfig {
clone := source
clone.TrustedProxyCIDRs = append([]string(nil), source.TrustedProxyCIDRs...)