SOA Email Format

This commit is contained in:
Sense T 2024-04-09 07:58:27 +08:00
parent fb9c78efed
commit 33c9050653

View File

@ -17,6 +17,7 @@ type Domain struct {
} }
func (d *Domain) EmailSOAForamt() string { func (d *Domain) EmailSOAForamt() string {
soa := strings.Replace(d.AdminEmail, ".", "\\", 1) s := strings.Split(d.AdminEmail, "@")
return strings.Replace(soa, "@", ".", 1) s[0] = strings.Replace(s[0], ".", "\\", -1)
return strings.Join(s, ".")
} }