maddy

package module
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: GPL-3.0 Imports: 62 Imported by: 0

README

Madmail - Maddy Chatmail Server

A mad fork of maddy, bringing the madness to mail delivery — optimized for instant, secure messaging with #deltachat.

Documentation

For installation, configuration, and detailed guides, please refer to the Documentation Index.

[!IMPORTANT] Parts of this project are developed with AI assistance. Read our AI Disclosure & Security Model for more details.

Resources

License

Licensed under GPL-3.0.

Documentation

Index

Constants

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

Variables

View Source
var (
	// ConfigDirectory specifies the configuration directory.
	// It can be overridden at build time via -X linker flag:
	//   -X github.com/themadorg/madmail.ConfigDirectory=/etc/myapp
	//
	// If empty (the default), the directory is derived at runtime from
	// the running binary name: /etc/<binaryname>.
	//
	// It should not be changed at runtime and is a variable only
	// for linker flag modification.
	ConfigDirectory = ""

	// DefaultStateDirectory specifies the default state directory.
	// If empty, derived at runtime as /var/lib/<binaryname>.
	DefaultStateDirectory = ""

	// DefaultRuntimeDirectory specifies the default runtime directory.
	// If empty, derived at runtime as /run/<binaryname>.
	DefaultRuntimeDirectory = ""

	// DefaultLibexecDirectory specifies the default libexec directory.
	// If empty, derived at runtime as /usr/lib/<binaryname>.
	DefaultLibexecDirectory = ""
)
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 ReadGlobals

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

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

func RegisterModules

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

type SDStatus

type SDStatus string

Directories

Path Synopsis
cmd
maddy command
maddy-profile command
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
Package config provides runtime path resolution for Madmail binaries.
Package config provides runtime path resolution for Madmail binaries.
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
adminweb
Package adminweb embeds the pre-built admin dashboard SPA (SvelteKit static output).
Package adminweb embeds the pre-built admin dashboard SPA (SvelteKit static output).
api/admin
Package admin implements a single-endpoint RPC-style Admin API for Madmail.
Package admin implements a single-endpoint RPC-style Admin API for Madmail.
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
db
dsn
Package dsn contains the utilities used for dsn message (DSN) generation.
Package dsn contains the utilities used for dsn message (DSN) generation.
endpoint_cache
Package endpoint_cache implements a database-backed endpoint override cache.
Package endpoint_cache implements a database-backed endpoint override cache.
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.
quota
Package quota provides an in-memory quota cache with RWMutex protection for fast lookup of per-user storage usage and limits.
Package quota provides an in-memory quota cache with RWMutex protection for fast lookup of per-user storage usage and limits.
servertracker
Package servertracker provides an in-memory tracker for unique email servers seen by the SMTP endpoint.
Package servertracker provides an in-memory tracker for unique email servers seen by the SMTP endpoint.
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