Documentation ¶
Overview ¶
smtp server implementation
Index ¶
- Constants
- func Version() string
- type MailEvent
- type MailHandler
- type Server
- func (s *Server) Bind() (err error)
- func (s *Server) Bounce(recip, from, fpath string, e error)
- func (s *Server) FindStoreFor(email string) (st mailstore.Store, has bool)
- func (s *Server) LoadConfig(fname string) (err error)
- func (s *Server) PermitSend(from, username string) bool
- func (s *Server) Plain(username, password string) bool
- func (s *Server) ReloadConfig() (err error)
- func (s *Server) Run()
- func (s *Server) Stop()
Constants ¶
View Source
const DEFAULT_ADMIN_LOGIN = "admin"
the default admin login
View Source
const SERV_NAME = "Brain Dead Simple Mail Server"
View Source
const VERS_MAJOR = 0
View Source
const VERS_MINOR = 1
View Source
const VERS_PATCH = 0
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MailEvent ¶
type MailEvent struct { // remote address of sender Addr string // recipiant of message Recip string // sender of message Sender string // file containg the message File string }
event fired when we got a new mail message
type MailHandler ¶
type MailHandler interface { // we got a mail message // handle it somehow GotMail(ev *MailEvent) // do we accept mail going to this recipiant? AllowRecipiant(recip string) bool }
handler of mail messages
type Server ¶
type Server struct { // custom mail handler Handler MailHandler // tls config TLS *tls.Config // contains filtered or unexported fields }
mail server
func (*Server) FindStoreFor ¶
get a local maildir or empty string if it's not local to us
func (*Server) LoadConfig ¶
load configuration file
func (*Server) PermitSend ¶
func (*Server) ReloadConfig ¶
reload server configuration
Click to show internal directories.
Click to hide internal directories.