server

package
v0.0.0-...-b88a8d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSystemStatus                        = 211
	CodeHelpMessage                         = 214
	CodeServiceReady                        = 220
	CodeServiceClosing                      = 221
	CodeOK                                  = 250
	CodeUserNotLocal                        = 251
	CodeCannotVRFYUser                      = 252
	CodeStartMailInput                      = 354
	CodeServiceNotAvailable                 = 421
	CodeMailboxUnavailable                  = 450
	CodeLocalErrorInProcessing              = 451
	CodeInsufficientSystemStorage           = 452
	CodeServerUnableToAccommodateParameters = 455
	CodeSyntaxError                         = 500
	CodeSyntaxErrorInParametersOrArguments  = 501
	CodePermCommandNotImplemented           = 502
	CodePermBadSequenceOfCommands           = 503
	CodePermCommandParameterNotImplemented  = 504
	CodePermMailboxUnavailable              = 550
	CodePermUserNotLocal                    = 551
	CodePermExceededStorageAllocation       = 552
	CodePermMailboxNameNotAllowed           = 553
	CodePermTransactionFailed               = 554
	CodePermMailRcptParameterError          = 555
)
View Source
const (
	NONE = ""

	HELP     = "HELP"
	VRFY     = "VRFY"
	EXPN     = "EXPN"
	SIZE     = "SIZE"
	STARTTLS = "STARTTLS"

	EHLO = "EHLO"
	HELO = "HELO"
	MAIL = "MAIL"
	RCPT = "RCPT"
	DATA = "DATA"

	AUTH          = "AUTH"
	RSET          = "RSET"
	NOOP          = "NOOP"
	QUIT          = "QUIT"
	EIGHT_BITMIME = "8BITMIME"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	FindMailbox(usernameOrAddress string) (*mail.Address, bool)
	SaveEmail(addr *mail.Address, from, tos string, data []byte) error
}

Repository represents email repository

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(repo Repository) *Server

func NewWithTLS

func NewWithTLS(repo Repository, certFile, keyFile string) *Server

func (*Server) Start

func (svr *Server) Start(addr string, onListenErr, onAcceptErr func(error))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL