diff --git a/models/domain.go b/models/domain.go index c3b25d2..a792b34 100644 --- a/models/domain.go +++ b/models/domain.go @@ -17,6 +17,7 @@ type Domain struct { } func (d *Domain) EmailSOAForamt() string { - soa := strings.Replace(d.AdminEmail, ".", "\\", 1) - return strings.Replace(soa, "@", ".", 1) + s := strings.Split(d.AdminEmail, "@") + s[0] = strings.Replace(s[0], ".", "\\", -1) + return strings.Join(s, ".") }