Removed check for single '@' in address.
This commit is contained in:
parent
752519b0c8
commit
c009354c02
1 changed files with 0 additions and 8 deletions
|
@ -3,17 +3,9 @@ package smtpd
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/mail"
|
"net/mail"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseAddress(src string) (string, error) {
|
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
|
// While a RFC5321 mailbox specification is not the same as an RFC5322
|
||||||
// email address specification, it is better to accept that format and
|
// 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
|
// parse it down to the actual address, as there are a lot of badly
|
||||||
|
|
Loading…
Add table
Reference in a new issue