maddy

package module
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 58 Imported by: 0

README

Maddy Mail Server

Composable all-in-one mail server.

Maddy Mail Server implements all functionality required to run a e-mail server. It can send messages via SMTP (works as MTA), accept messages via SMTP (works as MX) and store messages while providing access to them via IMAP. In addition to that it implements auxiliary protocols that are mandatory to keep email reasonably secure (DKIM, SPF, DMARC, DANE, MTA-STS).

It replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC and more with one daemon with uniform configuration and minimal maintenance cost.

Note: IMAP storage is "beta". If you are looking for stable and feature-packed implementation you may want to use Dovecot instead. maddy still can handle message delivery business.

CI status Issues tracker

Documentation

Index

Constants

View Source
const (
	SDReady     = "READY=1"
	SDReloading = "RELOADING=1"
	SDStopping  = "STOPPING=1"
)

Variables

View Source
var (
	// ConfigDirectory specifies platform-specific value
	// that should be used as a location of default configuration
	//
	// It should not be changed and is defined as a variable
	// only for purposes of modification using -X linker flag.
	ConfigDirectory = "/etc/maddy"

	// DefaultStateDirectory specifies platform-specific
	// default for StateDirectory.
	//
	// Most code should use StateDirectory instead since
	// it will contain the effective location of the state
	// directory.
	//
	// It should not be changed and is defined as a variable
	// only for purposes of modification using -X linker flag.
	DefaultStateDirectory = "/var/lib/maddy"

	// DefaultRuntimeDirectory specifies platform-specific
	// default for RuntimeDirectory.
	//
	// Most code should use RuntimeDirectory instead since
	// it will contain the effective location of the state
	// directory.
	//
	// It should not be changed and is defined as a variable
	// only for purposes of modification using -X linker flag.
	DefaultRuntimeDirectory = "/run/maddy"

	// DefaultLibexecDirectory specifies platform-specific
	// default for LibexecDirectory.
	//
	// Most code should use LibexecDirectory since it will
	// contain the effective location of the libexec
	// directory.
	//
	// It should not be changed and is defined as a variable
	// only for purposes of modification using -X linker flag.
	DefaultLibexecDirectory = "/usr/lib/maddy"
)
View Source
var ErrNoNotifySock = errors.New("no systemd socket")
View Source
var (
	Version = "go-build"
)

Functions

func BuildInfo

func BuildInfo() string

func InitDirs

func InitDirs() error

func LogOutputOption

func LogOutputOption(args []string) (log.Output, error)

func ReadGlobals added in v0.3.0

func ReadGlobals(cfg []config.Node) (map[string]interface{}, []config.Node, error)

func Run

func Run(c *cli.Context) error

Run is the entry point for all server-running code. It takes care of command line arguments processing, logging initialization, directives setup, configuration reading. After all that, it calls moduleMain to initialize and run modules.

Types

type ModInfo added in v0.3.0

type ModInfo struct {
	Instance module.Module
	Cfg      config.Node
}

func RegisterModules added in v0.3.0

func RegisterModules(globals map[string]interface{}, nodes []config.Node) (endpoints, mods []ModInfo, err error)

type SDStatus

type SDStatus string

Directories

Path Synopsis
cmd
framework
address
Package address provides utilities for parsing and validation of RFC 2821 addresses.
Package address provides utilities for parsing and validation of RFC 2821 addresses.
buffer
The buffer package provides utilities for temporary storage (buffering) of large blobs.
The buffer package provides utilities for temporary storage (buffering) of large blobs.
cfgparser
Package config provides set of utilities for configuration parsing.
Package config provides set of utilities for configuration parsing.
config/module
Package modconfig provides matchers for config.Map that query modules registry and parse inline module definitions.
Package modconfig provides matchers for config.Map that query modules registry and parse inline module definitions.
dns
Package dns defines interfaces used by maddy modules to perform DNS lookups.
Package dns defines interfaces used by maddy modules to perform DNS lookups.
exterrors
Package errors defines error-handling and primitives used across maddy, notably to pass additional error information across module boundaries.
Package errors defines error-handling and primitives used across maddy, notably to pass additional error information across module boundaries.
log
Package log implements a minimalistic logging library.
Package log implements a minimalistic logging library.
logparser
Package parser provides utilities for parsing of structured log messsages generated by maddy.
Package parser provides utilities for parsing of structured log messsages generated by maddy.
module
Package module contains modules registry and interfaces implemented by modules.
Package module contains modules registry and interfaces implemented by modules.
internal
auth/shadow
shadow package implements utilities for parsing and using shadow password database on Unix systems.
shadow package implements utilities for parsing and using shadow password database on Unix systems.
cli
dsn
Package dsn contains the utilities used for dsn message (DSN) generation.
Package dsn contains the utilities used for dsn message (DSN) generation.
limits
Package limit provides a module object that can be used to restrict the concurrency and rate of the messages flow globally or on per-source, per-destination basis.
Package limit provides a module object that can be used to restrict the concurrency and rate of the messages flow globally or on per-source, per-destination basis.
limits/limiters
Package limiters provides a set of wrappers intended to restrict the amount of resources consumed by the server.
Package limiters provides a set of wrappers intended to restrict the amount of resources consumed by the server.
smtpconn
Package smtpconn contains the code shared between target.smtp and remote modules.
Package smtpconn contains the code shared between target.smtp and remote modules.
storage/imapsql
Package imapsql implements SQL-based storage module using go-imap-sql library (github.com/foxcpp/go-imap-sql).
Package imapsql implements SQL-based storage module using go-imap-sql library (github.com/foxcpp/go-imap-sql).
target/queue
Package queue implements module which keeps messages on disk and tries delivery to the configured target (usually remote) multiple times until all recipients are succeeded.
Package queue implements module which keeps messages on disk and tries delivery to the configured target (usually remote) multiple times until all recipients are succeeded.
target/remote
Package remote implements module which does outgoing message delivery using servers discovered using DNS MX records.
Package remote implements module which does outgoing message delivery using servers discovered using DNS MX records.
target/smtp
Package smtp_downstream provides target.smtp module that implements transparent forwarding or messages to configured list of SMTP servers.
Package smtp_downstream provides target.smtp module that implements transparent forwarding or messages to configured list of SMTP servers.
tls
updatepipe
Package updatepipe implements utilities for serialization and transport of IMAP update objects between processes and machines.
Package updatepipe implements utilities for serialization and transport of IMAP update objects between processes and machines.
Package tests provides the framework for integration testing of maddy.
Package tests provides the framework for integration testing of maddy.

Jump to

Keyboard shortcuts

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