admin: in self-check for spf records against our ip's, don't try checking the unspecified addresses (0.0.0.0 and ::), and warn if there are no explicitly configured ips

based on question by spectral369 on #mox on matrix
This commit is contained in:
Mechiel Lukkien
2024-11-24 12:32:45 +01:00
parent 501f594a0a
commit 726c0931f7
2 changed files with 10 additions and 2 deletions

View File

@ -684,6 +684,9 @@ func DomainSPFIPs() (ips []net.IP) {
}
for _, ipstr := range ipstrs {
ip := net.ParseIP(ipstr)
if ip.IsUnspecified() {
continue
}
ips = append(ips, ip)
}
}