Documentation ¶
Overview ¶
Package config implements the chasquid configuration.
Index ¶
- Variables
- func LogConfig(c *Config)
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetDataDir() string
- func (x *Config) GetDovecotAuth() bool
- func (x *Config) GetDovecotClientPath() string
- func (x *Config) GetDovecotUserdbPath() string
- func (x *Config) GetDropCharacters() string
- func (x *Config) GetHaproxyIncoming() bool
- func (x *Config) GetHostname() string
- func (x *Config) GetMailDeliveryAgentArgs() []string
- func (x *Config) GetMailDeliveryAgentBin() string
- func (x *Config) GetMailLogPath() string
- func (x *Config) GetMaxDataSizeMb() int64
- func (x *Config) GetMonitoringAddress() string
- func (x *Config) GetSmtpAddress() []string
- func (x *Config) GetSubmissionAddress() []string
- func (x *Config) GetSubmissionOverTlsAddress() []string
- func (x *Config) GetSuffixSeparators() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_config_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Config ¶
type Config struct { // Default hostname to use when saying hello. // This is used: // 1) To say hello to clients, for aesthetic purposes. // 2) As the HELO/EHLO domain on outgoing SMTP connections, so ideally // it would resolve back to the server. In practice, it's not a big // deal if it isn't, but it makes troubleshooting easier. // Default: the system's hostname. Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` // Maximum email size, in megabytes. // Default: 50. MaxDataSizeMb int64 `protobuf:"varint,2,opt,name=max_data_size_mb,json=maxDataSizeMb,proto3" json:"max_data_size_mb,omitempty"` // Addresses to listen on for SMTP (usually port 25). // Default: "systemd", which means systemd passes sockets to us. // systemd sockets must be named with "FileDescriptorName=smtp". SmtpAddress []string `protobuf:"bytes,3,rep,name=smtp_address,json=smtpAddress,proto3" json:"smtp_address,omitempty"` // Addresses to listen on for submission (usually port 587). // Default: "systemd", which means systemd passes sockets to us. // systemd sockets must be named with "FileDescriptorName=submission". SubmissionAddress []string `protobuf:"bytes,4,rep,name=submission_address,json=submissionAddress,proto3" json:"submission_address,omitempty"` // Addresses to listen on for submission-over-TLS (usually port 465). // Default: "systemd", which means systemd passes sockets to us. // systemd sockets must be named with "FileDescriptorName=submission_tls". SubmissionOverTlsAddress []string `` /* 137-byte string literal not displayed */ // Address for the monitoring http server. // Do NOT expose this to the public internet. // Default: no monitoring http server. MonitoringAddress string `protobuf:"bytes,6,opt,name=monitoring_address,json=monitoringAddress,proto3" json:"monitoring_address,omitempty"` // Mail delivery agent (MDA, also known as LDA) to use. // This should point to the binary to use to deliver email to local users. // The content of the email will be passed via stdin. // If it exits unsuccessfully, we assume the mail was not delivered. // Default: "maildrop". MailDeliveryAgentBin string `protobuf:"bytes,7,opt,name=mail_delivery_agent_bin,json=mailDeliveryAgentBin,proto3" json:"mail_delivery_agent_bin,omitempty"` // Command line arguments for the mail delivery agent. One per argument. // Some replacements will be done. // On an email sent from marsnik@mars to venera@venus: // - %from% -> from address (marsnik@mars) // - %from_user% -> from user (marsnik) // - %from_domain% -> from domain (mars) // - %to% -> to address (venera@venus) // - %to_user% -> to user (venera) // - %to_domain% -> to domain (venus) // // Default: "-f", "%from%", "-d", "%to_user%" (adequate for procmail // and maildrop). MailDeliveryAgentArgs []string `` /* 128-byte string literal not displayed */ // Directory where we store our persistent data. // Default: "/var/lib/chasquid" DataDir string `protobuf:"bytes,9,opt,name=data_dir,json=dataDir,proto3" json:"data_dir,omitempty"` // Suffix separator, to perform suffix removal of local users. // For example, if you set this to "-+", email to local user // "user-blah" and "user+blah" will be delivered to "user". // Including "+" is strongly encouraged, as it is assumed for email // forwarding. // Default: "+". SuffixSeparators *string `protobuf:"bytes,10,opt,name=suffix_separators,json=suffixSeparators,proto3,oneof" json:"suffix_separators,omitempty"` // Characters to drop from the user part on local emails. // For example, if you set this to "._", email to local user // "u.se_r" will be delivered to "user". // Default: ".". DropCharacters *string `protobuf:"bytes,11,opt,name=drop_characters,json=dropCharacters,proto3,oneof" json:"drop_characters,omitempty"` // Path where to write the mail log to. // If "<syslog>", log using the syslog (at MAIL|INFO priority). // If "<stdout>", log to stdout; if "<stderr>", log to stderr. // Default: <syslog> MailLogPath string `protobuf:"bytes,12,opt,name=mail_log_path,json=mailLogPath,proto3" json:"mail_log_path,omitempty"` // Enable dovecot authentication. // Domains that don't have an user database will be authenticated via // dovecot. DovecotAuth bool `protobuf:"varint,13,opt,name=dovecot_auth,json=dovecotAuth,proto3" json:"dovecot_auth,omitempty"` // Dovecot userdb path. If dovecot_auth is set and this // is not, we will try to autodetect it. // Example: /var/run/dovecot/auth-userdb DovecotUserdbPath string `protobuf:"bytes,14,opt,name=dovecot_userdb_path,json=dovecotUserdbPath,proto3" json:"dovecot_userdb_path,omitempty"` // Dovecot client path. If dovecot_auth is set and this // is not, we will try to autodetect it. // Example: /var/run/dovecot/auth-client DovecotClientPath string `protobuf:"bytes,15,opt,name=dovecot_client_path,json=dovecotClientPath,proto3" json:"dovecot_client_path,omitempty"` // Expect incoming SMTP connections to use the HAProxy protocol. // This allows deploying chasquid behind a HAProxy server, as the // address information is preserved. HaproxyIncoming bool `protobuf:"varint,16,opt,name=haproxy_incoming,json=haproxyIncoming,proto3" json:"haproxy_incoming,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetDataDir ¶
func (*Config) GetDovecotAuth ¶
func (*Config) GetDovecotClientPath ¶
func (*Config) GetDovecotUserdbPath ¶
func (*Config) GetDropCharacters ¶
func (*Config) GetHaproxyIncoming ¶
func (*Config) GetHostname ¶
func (*Config) GetMailDeliveryAgentArgs ¶
func (*Config) GetMailDeliveryAgentBin ¶
func (*Config) GetMailLogPath ¶
func (*Config) GetMaxDataSizeMb ¶
func (*Config) GetMonitoringAddress ¶
func (*Config) GetSmtpAddress ¶
func (*Config) GetSubmissionAddress ¶
func (*Config) GetSubmissionOverTlsAddress ¶
func (*Config) GetSuffixSeparators ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.