ctl

package
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: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAddress

func FormatAddress(addr *imap.Address) string

func FormatAddressList

func FormatAddressList(addrs []*imap.Address) string

Types

type AppendLimitUser

type AppendLimitUser interface {
	imapbackend.AppendLimitUser

	// SetMessageLimit sets new value for limit.
	// nil pointer means no limit.
	SetMessageLimit(val *uint32) error
}

AppendLimitUser is extension for backend.User interface which allows to set append limit value for testing and administration purposes.

type InstallConfig

type InstallConfig struct {
	// Basic configuration
	Hostname      string
	PrimaryDomain string
	LocalDomains  string
	StateDir      string
	RuntimeDir    string
	Generated     string
	SimpleInstall bool

	// TLS configuration
	TLSCertPath   string
	TLSKeyPath    string
	GenerateCerts bool

	// TLS mode: "autocert" (HTTP-01), "acme" (DNS-01), "file" (user certs), "self_signed" (auto-gen)
	TLSMode string

	// ACME (Let's Encrypt) configuration
	ACMEEmail       string
	ACMEChallenge   string // "dns-01" for now
	ACMEDNSProvider string // e.g., "cloudflare", "gandi", etc.
	ACMEDNSToken    string // API token for the DNS provider
	ACMEStorePath   string // Where to store ACME certificates
	ACMEAgreed      bool   // Whether the user agreed to the ToS

	// Network configuration
	SMTPPort       string
	SubmissionPort string
	SubmissionTLS  string
	IMAPPort       string
	IMAPTLS        string

	// Chatmail configuration
	EnableChatmail       bool
	ChatmailHTTPPort     string
	ChatmailHTTPSPort    string
	ChatmailUsernameLen  int
	ChatmailPasswordLen  int
	EnableContactSharing bool

	// Shadowsocks configuration
	EnableSS   bool
	SSAddr     string
	SSPassword string
	SSCipher   string

	// TURN configuration
	EnableTURN bool
	TURNServer string
	TURNPort   string
	TURNSecret string
	TURNTTL    int

	// PGP Encryption configuration
	RequirePGPEncryption     bool
	AllowSecureJoin          bool
	PGPPassthroughSenders    []string
	PGPPassthroughRecipients []string

	// DNS configuration (for template)
	A             string
	AAAA          string
	DKIM_Entry    string
	STS_ID        string
	ACME_Account  string
	UseCloudflare bool // Add Cloudflare proxy disable tags
	PublicIP      string

	// Security configuration
	AllowInsecureAuth bool
	TurnOffTLS        bool

	// System configuration
	MaddyUser      string
	MaddyGroup     string
	ConfigDir      string
	SystemdPath    string
	BinaryPath     string
	LibexecDir     string
	NoLog          bool
	Debug          bool
	MaxMessageSize string
	SkipSync       bool
	SkipUser       bool
	SkipSystemd    bool
	// Iroh relay configuration
	EnableIroh bool
	IrohPort   string

	// Internal state
	SkipPrompts bool

	// Admin API
	AdminToken string

	// BinaryName drives all derived paths: config dir, state dir, systemd unit
	// names, and system user/group. Set via --binary-name flag or inferred from
	// os.Executable() at runtime.
	//
	// Stealth deployment: rename or alias the binary to something innocuous
	// (e.g. "sysmond") so government automated scans of ps, systemctl, and /etc/
	// do not reveal that a mail server is running.
	BinaryName string
}

InstallConfig holds all configuration values for the installation

type SpecialUseUser

type SpecialUseUser interface {
	CreateMailboxSpecial(name, specialUseAttr string) error
}

type UninstallConfig

type UninstallConfig struct {
	// Detected configuration
	ServiceFiles  []string
	ConfigFiles   []string
	StateDir      string
	ConfigDir     string
	BinaryPath    string
	MaddyUser     string
	MaddyGroup    string
	LogFiles      []string
	DatabaseFiles []string
	CertFiles     []string

	// Service status
	ServiceRunning bool
	ServiceEnabled bool
	IrohRunning    bool
	IrohEnabled    bool

	// Installation detection
	InstallationFound bool
	SystemdUnit       string
	IrohUnit          string
	ConfigPath        string
	IrohConfigPath    string
	IrohBinaryPath    string
}

UninstallConfig holds information about the current maddy installation

Jump to

Keyboard shortcuts

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