feat: 出站地址族可配置(ip_family=ipv4/ipv6/auto)+ 源地址绑定(source_ip)
- ip_family 默认 ipv4(保持 PTR/SPF 最可靠的路径);运营商为静态 IPv6 配置 PTR 后可切换 ipv6 - source_ip 绑定出站源地址,避免内核使用轮换的 IPv6 临时隐私地址 (临时地址无 PTR,Gmail 等会拒收) - 无 MX 回退时按地址族偏好排序 A/AAAA
This commit is contained in:
@@ -56,6 +56,11 @@ func NewManager(cfg config.OutboundConfig, hostname string, stores *store.Stores
|
||||
lim: make(map[uint]*userWindow),
|
||||
batch: 50,
|
||||
}
|
||||
m.mailer.IPFamily = cfg.IPFamily
|
||||
m.mailer.SourceIP = cfg.SourceIP
|
||||
if cfg.SourceIP != "" {
|
||||
log.Printf("outbound: binding source address %s (ip_family=%s)", cfg.SourceIP, cfg.IPFamily)
|
||||
}
|
||||
|
||||
if cfg.RelayHost != "" {
|
||||
m.mailer.Relay = &RelayConfig{
|
||||
|
||||
Reference in New Issue
Block a user