Versions in this module Expand all Collapse all v0 v0.8.1 Jul 17, 2022 Changes in this version + var Debug = false + var ErrServerClosed = errors.New("Server has been closed") + func ListenAndServe(addr string, handler Handler, appname string, hostname string) error + func ListenAndServeTLS(addr string, certFile string, keyFile string, handler Handler, appname string, ...) error + type AuthHandler func(remoteAddr net.Addr, mechanism string, uername []byte, password []byte, ...) (bool, error) + type Handler func(remoteAddr net.Addr, from string, to []string, data []byte, ...) error + type HandlerRcpt func(remoteAddr net.Addr, from string, to string) bool + type LogFunc func(remoteIP, verb, line string) + type Server struct + Addr string + Appname string + AuthHandler AuthHandler + AuthMechs map[string]bool + AuthRequired bool + Handler Handler + HandlerRcpt HandlerRcpt + Hostname string + LogRead LogFunc + LogWrite LogFunc + MaxSize int + TLSConfig *tls.Config + TLSListener bool + TLSRequired bool + Timeout time.Duration + func (srv *Server) Close() error + func (srv *Server) ConfigureTLS(certFile string, keyFile string) error + func (srv *Server) ConfigureTLSWithPassphrase(certFile string, keyFile string, passphrase string) error + func (srv *Server) ListenAndServe() error + func (srv *Server) Serve(ln net.Listener) error + func (srv *Server) Shutdown(ctx context.Context) error