server

package
v0.0.0-...-61dab83 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupEmail

func CleanupEmail(str string) (email string, err error)

Types

type MailServer

type MailServer struct {
	Hostname string
	Port     string

	ForwardEnabled    bool
	ForwardHostFilter bool
	ForwardHost       string
	ForwardPort       string
	ForwardUser       string
	ForwardPassword   string

	Debug bool
	// In-Memory Database
	Database database.DataStore

	Httpport string
	Ssl      bool
	Sslcert  string
	Sslkey   string

	ExpireMutex    *sync.Mutex
	Expireinterval int
	// contains filtered or unexported fields
}

MailServer is the main configuration structure of the program holds configuration and state

func NewMailServer

func NewMailServer(server MailServer) *MailServer

func (*MailServer) ForwardEmail

func (server *MailServer) ForwardEmail(client *model.Mail)

func (*MailServer) NotifyListeners

func (server *MailServer) NotifyListeners(mc model.MailConnection)

func (*MailServer) RegisterListener

func (server *MailServer) RegisterListener(id string, listener chan model.MailConnection)

func (*MailServer) RemoveListener

func (server *MailServer) RemoveListener(id string)

func (*MailServer) SaveMail

func (server *MailServer) SaveMail(mc *model.MailConnection) bool

Jump to

Keyboard shortcuts

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