Documentation ¶
Index ¶
- func HashMailboxName(mailbox string) string
- func JoinStringList(listOfStrings *list.List) string
- func ParseEmailAddress(address string) (local string, domain string, err error)
- func ParseMailboxName(localPart string) (result string, err error)
- func ValidateDomainPart(domain string) bool
- type Client
- type Server
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashMailboxName ¶
Take a mailbox name and hash it into the directory we'll store it in
func JoinStringList ¶
JoinStringList joins a List containing strings by commas
func ParseEmailAddress ¶
ParseEmailAddress unescapes an email address, and splits the local part from the domain part. An error is returned if the local or domain parts fail validation following the guidelines in RFC3696.
func ParseMailboxName ¶
Take "user+ext" and return "user", aka the mailbox we'll store it in Return error if it contains invalid characters, we don't accept anything that must be quoted according to RFC3696.
func ValidateDomainPart ¶
ValidateDomainPart returns true if the domain part complies to RFC3696, RFC1035
Types ¶
type Server ¶
type Server struct { Store *data.DataStore EnableXCLIENT bool TLSConfig *tls.Config ForceTLS bool Debug bool DebugPath string HostGreyList bool FromGreyList bool RcptGreyList bool SpamRegex string // contains filtered or unexported fields }
Real server code starts here
func NewSmtpServer ¶
func NewSmtpServer(cfg config.SmtpConfig, ds *data.DataStore) *Server
Init a new Client object
Click to show internal directories.
Click to hide internal directories.