Removed check for single '@' in address.

This commit is contained in:
Nathan Ollerenshaw 2018-06-29 14:32:02 -07:00
parent 752519b0c8
commit c009354c02

View file

@ -3,17 +3,9 @@ package smtpd
import (
"fmt"
"net/mail"
"strings"
)
func parseAddress(src string) (string, error) {
// Mailbox specifications as per RFC5321 must have a local part and a
// domain part separated by '@'
if strings.Count(src, "@") != 1 {
return "", fmt.Errorf("malformed e-mail address: %s", src)
}
// While a RFC5321 mailbox specification is not the same as an RFC5322
// email address specification, it is better to accept that format and
// parse it down to the actual address, as there are a lot of badly