Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the configuration and state of our SMTP server.
func NewServer ¶
func NewServer( smtpConfig config.SMTP, manager message.Manager, apolicy *policy.Addressing, extHost *extension.Host, ) *Server
NewServer creates a new, unstarted, SMTP server instance with the specificed config.
func (*Server) Drain ¶
func (s *Server) Drain()
Drain causes the caller to block until all active SMTP sessions have finished
type Session ¶
type Session struct { *Server // Server this session belongs to. // contains filtered or unexported fields }
Session holds the state of an SMTP session
func NewSession ¶
NewSession creates a new Session for the given connection
type State ¶
type State int
State tracks the current mode of our SMTP state machine.
const ( // GREET State: Waiting for HELO GREET State = iota // READY State: Got HELO, waiting for MAIL READY // LOGIN State: Got AUTH LOGIN command, expecting Username LOGIN // PASSWORD State: Got Username, expecting password PASSWORD // MAIL State: Got MAIL, accepting RCPTs MAIL // DATA State: Got DATA, waiting for "." DATA // QUIT State: Client requested end of session QUIT )
Click to show internal directories.
Click to hide internal directories.