rfc5321

package
v0.0.0-...-c554e92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 Parser

type Parser struct {
	NullPath  bool
	LocalPart string
	Domain    string

	ADL        []string
	PathParams [][]string
	// contains filtered or unexported fields
}

Parse Email Addresses according to https://tools.ietf.org/html/rfc5321

func NewParser

func NewParser(buf []byte) *Parser

func (*Parser) MailFrom

func (s *Parser) MailFrom(input []byte) (err error)

MailFrom accepts the following syntax: Reverse-path [SP Mail-parameters] CRLF

func (*Parser) QcontentSMTP

func (s *Parser) QcontentSMTP() error

qtextSMTP / quoted-pairSMTP quoted-pairSMTP = %d92 %d32-126 qtextSMTP = %d32-33 / %d35-91 / %d93-126

func (*Parser) RcptTo

func (s *Parser) RcptTo(input []byte) (err error)

RcptTo accepts the following syntax: ( "<Postmaster@" Domain ">" / "<Postmaster>" /

Forward-path ) [SP Rcpt-parameters] CRLF

func (*Parser) Reset

func (s *Parser) Reset()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL