imapsmtpserver

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyGluonCachePathSuffix

func ApplyGluonCachePathSuffix(basePath string) string

func ApplyGluonConfigPathSuffix

func ApplyGluonConfigPathSuffix(basePath string) string

Types

type IMAPEventPublisher

type IMAPEventPublisher interface {
	PublishIMAPEvent(ctx context.Context, event imapEvents.Event)
}

type IMAPSettingsProvider

type IMAPSettingsProvider interface {
	TLSConfig() *tls.Config
	LogClient() bool
	LogServer() bool
	Port() int
	SetPort(int) error
	UseSSL() bool
	CacheDirectory() string
	DataDirectory() (string, error)
	SetCacheDirectory(string) error
	EventPublisher() IMAPEventPublisher
	Version() *semver.Version
}

type SMTPSettingsProvider

type SMTPSettingsProvider interface {
	TLSConfig() *tls.Config
	Log() bool
	Port() int
	SetPort(int) error
	UseSSL() bool
	Identifier() identifier.UserAgentUpdater
}

type Service

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

Service manages the IMAP & SMTP servers and their listeners.

func NewService

func NewService(
	ctx context.Context,
	smtpSettings SMTPSettingsProvider,
	imapSettings IMAPSettingsProvider,
	eventPublisher events.EventPublisher,
	panicHandler async.PanicHandler,
	reporter reporter.Reporter,
	uidValidityGenerator imap.UIDValidityGenerator,
	telemetry Telemetry,
) *Service

func (*Service) AddIMAPUser

func (sm *Service) AddIMAPUser(
	ctx context.Context,
	connector connector.Connector,
	addrID string,
	idProvider imapservice.GluonIDProvider,
	syncStateProvider syncservice.StateProvider,
) error

func (*Service) AddSMTPAccount

func (sm *Service) AddSMTPAccount(ctx context.Context, service *bridgesmtp.Service) error

func (*Service) CloseServers

func (sm *Service) CloseServers(ctx context.Context) error

func (*Service) Init

func (sm *Service) Init(ctx context.Context, group *async.Group, subscription events.Subscription) error

func (*Service) RemoveIMAPUser

func (sm *Service) RemoveIMAPUser(ctx context.Context, deleteData bool, provider imapservice.GluonIDProvider, addrID ...string) error

func (*Service) RemoveSMTPAccount

func (sm *Service) RemoveSMTPAccount(ctx context.Context, service *bridgesmtp.Service) error

func (*Service) RestartIMAP

func (sm *Service) RestartIMAP(ctx context.Context) error

func (*Service) RestartSMTP

func (sm *Service) RestartSMTP(ctx context.Context) error

func (*Service) SetGluonDir

func (sm *Service) SetGluonDir(ctx context.Context, gluonDir string) error

type Telemetry

type Telemetry interface {
	SetCacheLocation(string)
}

Jump to

Keyboard shortcuts

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