lmtp

package
v0.0.0-...-865c5c3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(
	lmtpConfig Config,
	ldap *ldap.Connection,
	mailboxRepo *repository.MailboxRepository,
	messageRepo *repository.MessageRepository,
	userRepo *repository.UserRepository,
) (*Backend, error)

func (*Backend) AnonymousLogin

func (b *Backend) AnonymousLogin(_ *smtp.ConnectionState) (smtp.Session, error)

func (*Backend) Login

func (b *Backend) Login(_ *smtp.ConnectionState, username, password string) (smtp.Session, error)

type Config

type Config struct {
	// Can be ldap, static or none
	AuthenticationType string
	StaticAuth         StaticAuthConfig
}

type Session

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

func NewSession

func NewSession(mailboxRepo *repository.MailboxRepository, messageRepo *repository.MessageRepository, userRepo *repository.UserRepository) *Session

func (*Session) Data

func (s *Session) Data(r io.Reader) error

func (*Session) LMTPData

func (s *Session) LMTPData(r io.Reader, status smtp.StatusCollector) error

func (*Session) Logout

func (s *Session) Logout() error

func (*Session) Mail

func (s *Session) Mail(from string, opts smtp.MailOptions) error

func (*Session) Rcpt

func (s *Session) Rcpt(to string) error

func (*Session) Reset

func (s *Session) Reset()

type StaticAuthConfig

type StaticAuthConfig struct {
	StaticAuthUsername     string
	StaticAuthPasswordHash string
}

Jump to

Keyboard shortcuts

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