fix: relay_starttls 默认值始终为 true(未显式配置时),避免中继密码明文传输

This commit is contained in:
dsh
2026-08-16 00:09:53 -04:00
committed by root
parent 8fb7aef052
commit 76c98c94f3
+1 -1
View File
@@ -327,7 +327,7 @@ func LoadConfig() (*Config, error) {
// relay_starttls defaults to true for safety; the raw file is checked // relay_starttls defaults to true for safety; the raw file is checked
// because TOML decoding cannot distinguish an absent bool from false. // because TOML decoding cannot distinguish an absent bool from false.
if cfg.Outbound.RelayHost != "" && !strings.Contains(string(data), "relay_starttls") { if !strings.Contains(string(data), "relay_starttls") {
cfg.Outbound.RelayStartTLS = defaults.Outbound.RelayStartTLS cfg.Outbound.RelayStartTLS = defaults.Outbound.RelayStartTLS
} }