Documentation ¶
Overview ¶
Package smtpserver implements an SMTP server for submission and incoming delivery of mail messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Localserve bool
If set, regular delivery/submit is sidestepped, email is accepted and delivered to the account named mox.
Functions ¶
Types ¶
type AuthMethod ¶
type AuthMethod struct { // E.g. "dkim", "spf", "iprev", "auth". Method string Result string // Each method has a set of known values, e.g. "pass", "temperror", etc. Comment string // Optional, message header comment. Reason string // Optional. Props []AuthProp }
AuthMethod is a result for one authentication method.
Example encoding in the header: "spf=pass smtp.mailfrom=example.net".
type AuthProp ¶
type AuthProp struct { // Valid values maintained at https://www.iana.org/assignments/email-auth/email-auth.xhtml Type string Property string Value string // Whether value is address-like (localpart@domain, or domain). Or another value, // which is subject to escaping. IsAddrLike bool Comment string // If not empty, header comment withtout "()", added after Value. }
AuthProp describes properties for an authentication method. Each method has a set of known properties. Encoded in the header as "type.property=value", e.g. "smtp.mailfrom=example.net" for spf.
type AuthResults ¶
type AuthResults struct { Hostname string Comment string // If not empty, header comment without "()", added after Hostname. Methods []AuthMethod }
Authentication-Results header, see RFC 8601.
func (AuthResults) Header ¶
func (h AuthResults) Header() string
Header returns an Authentication-Results header, possibly spanning multiple lines, always ending in crlf.