Documentation ¶
Index ¶
- Constants
- type AddressList
- type Parser
- func (s *Parser) Ehlo(input []byte) (domain string, ip net.IP, err error)
- func (s *Parser) Helo(input []byte) (domain string, err error)
- func (s *Parser) MailFrom(input []byte) (err error)
- func (s *Parser) QcontentSMTP() error
- func (s *Parser) RcptTo(input []byte) (err error)
- func (s *Parser) Reset()
- type RFC5322
- type SingleAddress
Constants ¶
View Source
const ( // The maximum total length of a reverse-path or forward-path is 256 LimitPath = 256 // The maximum total length of a user name or other local-part is 64 // however, here we double it, since a few major services don't respect that and go over LimitLocalPart = 64 * 2 // //The maximum total length of a domain name or number is 255 LimitDomain = 255 // The minimum total number of recipients that must be buffered is 100 LimitRecipients = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressList ¶
type AddressList struct { List []SingleAddress Group string }
type Parser ¶
type Parser struct { PathParams [][]string ADL []string LocalPart string LocalPartQuotes bool // does the local part need quotes? Domain string // can be an ip-address, enclosed in square brackets if it is IP net.IP NullPath bool // contains filtered or unexported fields }
Parse Email Addresses according to https://tools.ietf.org/html/rfc5321
func (*Parser) Ehlo ¶
ehlo = "EHLO" SP ( Domain / address-literal ) CRLF Note: "HELO" is ignored here
func (*Parser) Helo ¶
helo = "HELO" SP Domain CRLF Note: "HELO" is ignored here, so is the CRLF at the end
func (*Parser) MailFrom ¶
MailFrom accepts the following syntax: Reverse-path [SP Mail-parameters] CRLF
func (*Parser) QcontentSMTP ¶
qtextSMTP / quoted-pairSMTP quoted-pairSMTP = %d92 %d32-126 qtextSMTP = %d32-33 / %d35-91 / %d93-126
type RFC5322 ¶
type RFC5322 struct { AddressList Parser // contains filtered or unexported fields }
Parse productions according to ABNF in RFC5322
Click to show internal directories.
Click to hide internal directories.