maddy: github.com/foxcpp/maddy Index | Files | Directories

package maddy

import "github.com/foxcpp/maddy"

Index

Package Files

config.go maddy.go signal.go systemd.go

Constants

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

Variables

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"
)
var (
    ErrNoNotifySock = errors.New("no systemd socket")
)

func BuildInfo Uses

func BuildInfo() string

func InitDirs Uses

func InitDirs() error

func LogOutputOption Uses

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

func ReadGlobals Uses

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

func Run Uses

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.

type ModInfo Uses

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

func RegisterModules Uses

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

type SDStatus Uses

type SDStatus string

Directories

PathSynopsis
cmd/maddy
cmd/maddyctl
cmd/maddyctl/clitools
cmd/maddy-pam-helper
cmd/maddy-shadow-helper
framework/addressPackage address provides utilities for parsing and validation of RFC 2821 addresses.
framework/bufferThe buffer package provides utilities for temporary storage (buffering) of large blobs.
framework/cfgparserPackage config provides set of utilities for configuration parsing.
framework/config
framework/config/lexer
framework/config/modulePackage modconfig provides matchers for config.Map that query modules registry and parse inline module definitions.
framework/config/tls
framework/dnsPackage dns defines interfaces used by maddy modules to perform DNS lookups.
framework/exterrorsPackage errors defines error-handling and primitives used across maddy, notably to pass additional error information across module boundaries.
framework/future
framework/hooks
framework/logPackage log implements a minimalistic logging library.
framework/logparserPackage parser provides utilities for parsing of structured log messsages generated by maddy.
framework/modulePackage module contains modules registry and interfaces implemented by modules.
internal/auth
internal/auth/dovecot_sasl
internal/auth/external
internal/auth/pam
internal/auth/pass_table
internal/auth/plain_separate
internal/auth/shadowshadow package implements utilities for parsing and using shadow password database on Unix systems.
internal/check
internal/check/command
internal/check/dkim
internal/check/dns
internal/check/dnsbl
internal/check/milter
internal/check/requiretls
internal/check/rspamd
internal/check/spf
internal/dmarc
internal/dnsPackage dns defines interfaces used by maddy modules to perform DNS lookups.
internal/dsnPackage dsn contains the utilities used for dsn message (DSN) generation.
internal/endpoint/dovecot_sasld
internal/endpoint/imap
internal/endpoint/openmetrics
internal/endpoint/smtp
internal/imap_filter
internal/imap_filter/command
internal/limitsPackage 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.
internal/limits/limitersPackage limiters provides a set of wrappers intended to restrict the amount of resources consumed by the server.
internal/modify
internal/modify/dkim
internal/modulePackage module contains modules registry and interfaces implemented by modules.
internal/msgpipeline
internal/smtpconnThe package smtpconn contains the code shared between target.smtp and remote modules.
internal/smtpconn/pool
internal/storage/imapsqlPackage imapsql implements SQL-based storage module using go-imap-sql library (github.com/foxcpp/go-imap-sql).
internal/table
internal/target
internal/target/queuePackage queue implements module which keeps messages on disk and tries delivery to the configured target (usually remote) multiple times until all recipients are succeeded.
internal/target/remotePackage remote implements module which does outgoing message delivery using servers discovered using DNS MX records.
internal/target/smtpPackage smtp_downstream provides target.smtp module that implements transparent forwarding or messages to configured list of SMTP servers.
internal/testutils
internal/tls
internal/updatepipePackage updatepipe implements utilities for serialization and transport of IMAP update objects between processes and machines.
pkg/logparserPackage parser provides utilities for parsing of structured log messsages generated by maddy.
testsPackage tests provides the framework for integration testing of maddy.

Package maddy imports 47 packages (graph) and is imported by 2 packages. Updated 2020-11-27. Refresh now. Tools for package owners.