config

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package config handles the application configuration

Index

Constants

This section is empty.

Variables

View Source
var (
	// SMTPListen to listen on <interface>:<port>
	SMTPListen = "[::]:1025"

	// HTTPListen to listen on <interface>:<port>
	HTTPListen = "[::]:8025"

	// DataFile for mail (optional)
	DataFile string

	// MaxMessages is the maximum number of messages a mailbox can have (auto-pruned every minute)
	MaxMessages = 500

	// UseMessageDates sets the Created date using the message date, not the delivered date
	UseMessageDates bool

	// UITLSCert file
	UITLSCert string

	// UITLSKey file
	UITLSKey string

	// UIAuthFile for basic authentication
	UIAuthFile string

	// UIAuth used for euthentication
	UIAuth *htpasswd.File

	// Webroot to define the base path for the UI and API
	Webroot = "/"

	// SMTPTLSCert file
	SMTPTLSCert string

	// SMTPTLSKey file
	SMTPTLSKey string

	// SMTPAuthFile for SMTP authentication
	SMTPAuthFile string

	// SMTPAuthConfig used for authentication auto-generated from SMTPAuthFile
	SMTPAuthConfig *htpasswd.File

	// SMTPAuthAllowInsecure allows PLAIN & LOGIN unencrypted authentication
	SMTPAuthAllowInsecure bool

	// SMTPAuthAcceptAny accepts any username/password including none
	SMTPAuthAcceptAny bool

	// IgnoreDuplicateIDs will skip messages with the same ID
	IgnoreDuplicateIDs bool

	// SMTPCLITags is used to map the CLI args
	SMTPCLITags string

	// TagRegexp is the allowed tag characters
	TagRegexp = regexp.MustCompile(`^([a-zA-Z0-9\-\ \_]){3,}$`)

	// SMTPTags are expressions to apply tags to new mail
	SMTPTags []AutoTag

	// SMTPRelayConfigFile to parse a yaml file and store config of relay SMTP server
	SMTPRelayConfigFile string

	// SMTPRelayConfig to parse a yaml file and store config of relay SMTP server
	SMTPRelayConfig smtpRelayConfigStruct

	// ReleaseEnabled is whether message releases are enabled, requires a valid SMTPRelayConfigFile
	ReleaseEnabled = false

	// SMTPRelayAllIncoming is whether to relay all incoming messages via preconfgured SMTP server.
	// Use with extreme caution!
	SMTPRelayAllIncoming = false

	// ContentSecurityPolicy for HTTP server
	ContentSecurityPolicy = "" /* 219-byte string literal not displayed */

	// Version is the default application version, updated on release
	Version = "dev"

	// Repo on Github for updater
	Repo = "axllent/mailpit"

	// RepoBinaryName on Github for updater
	RepoBinaryName = "mailpit"
)

Functions

func VerifyConfig

func VerifyConfig() error

VerifyConfig wil do some basic checking

Types

type AutoTag added in v1.6.0

type AutoTag struct {
	Tag   string
	Match string
}

AutoTag struct for auto-tagging

Jump to

Keyboard shortcuts

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