maddy

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 39 Imported by: 0

README

maddy builds.sr.ht status codecov

Composable all-in-one mail server.

Features

  • IMAP4rev1 & SMTP server in one binary
  • Comprehensive & Secure
  • Simple to deploy
    • Two steps (excluding messing with DNS) to get your own secure mail server running
    • Virtual users > system users
    • Single daemon that is easy to manage
  • Fast
    • Optimized for concurrency
    • Single process model allows more efficient implementation
  • Useful
    • Subaddressing support
    • DNSBL checking support
    • Messages compression (LZ4, Zstd)
    • First-class Unicode support (SMTPUTF8, IDNA2008)
  • Flexible
    • Intuitive syntax for complex message routing (SMTP)
    • Same meaningful configuration scheme for all filters
    • Any builtin functionality can be replaced with third-party implementation if it you need it

Installation & configuration

Detailed explaination of what you need to do to get it running can be found here.

Documentation

The full documentation is published here

Manual pages with reference documentation will be installed by build.sh if scdoc utility is available on the system.

Community

There is IRC channel on freenode.net named #maddy. You can join it if you have any questions or just want to talk.

Also there is public mailing list for maddy-related discussions on https://lists.sr.ht/~foxcpp/maddy. You can use it too.

Contributing

See .github/CONTRIBUTING.md.

License

The code is under MIT license. See LICENSE for more information.

Documentation

Index

Constants

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

Variables

View Source
var (
	Version = "go-build"

	// 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")
)

Functions

func BuildInfo

func BuildInfo() string

func InitDirs

func InitDirs() error

func LogOutputOption

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

func Run

func Run() int

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

Types

type SDStatus

type SDStatus string

Directories

Path Synopsis
cmd
internal
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.
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.
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.
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.
dsn
Package dsn contains the utilities used for dsn message (DSN) generation.
Package dsn contains the utilities used for dsn message (DSN) generation.
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.
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.
log
Package log implements a minimalistic logging library.
Package log implements a minimalistic logging library.
module
Package module contains modules registry and interfaces implemented by modules.
Package module contains modules registry and interfaces implemented by modules.
smtpconn
The package smtpconn contains the code shared between smtp_downstream and remote modules.
The package smtpconn contains the code shared between smtp_downstream 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_downstream
Package smtp_downstream provides smtp_downstream module that implements transparent forwarding or messages to configured list of SMTP servers.
Package smtp_downstream provides smtp_downstream module that implements transparent forwarding or messages to configured list of SMTP servers.
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.
pkg
cfgparser
Package config provides set of utilities for configuration parsing.
Package config provides set of utilities for configuration parsing.
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.
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