Config reference
Mox uses two config files:
- mox.conf, also called the static configuration file.
- domains.conf, also called the dynamic configuration file.
The static configuration file is never reloaded during the lifetime of a
running mox instance. After changes to mox.conf, mox must be restarted for the
changes to take effect.
The dynamic configuration file is reloaded automatically when it changes.
If the file contains an error after the change, the reload is aborted and the
previous version remains active.
Below are "empty" config files, generated from the config file definitions in
the source code, along with comments explaining the fields. Fields named "x" are
placeholders for user-chosen map keys.
sconf #
The config files are in "sconf" format. Properties of sconf files:
- Indentation with tabs only.
- "#" as first non-whitespace character makes the line a comment. Lines with a
value cannot also have a comment.
- Values don't have syntax indicating their type. For example, strings are
not quoted/escaped and can never span multiple lines.
- Fields that are optional can be left out completely. But the value of an
optional field may itself have required fields.
See https://pkg.go.dev/github.com/mjl-/sconf for details.
mox.conf #
NoFixPermissions: false
#
AdditionalToSystem: false
#
ExternalAccountBinding:
#
ClientAuthDisabled: false
#
FirstTimeSenderDelay: 0s
#
TLSSessionTicketsDisabled: false
#
NoRequireSTARTTLS: false
#
NoRequireSTARTTLS: false
#
RateLimitDisabled: false
#
RateLimitDisabled: false
#
STARTTLSInsecureSkipVerify: false
#
STARTTLSInsecureSkipVerify: false
#
STARTTLSInsecureSkipVerify: false
#
NoOutgoingDMARCReports: false
#
NoOutgoingTLSReports: false
#
OutgoingTLSReportsForAllSuccess: false
#
domains.conf #
LocalpartCatchallSeparator:
#
LocalpartCatchallSeparators:
#
LocalpartCaseSensitive: false
#
KeepRetiredMessagePeriod: 0s
#
KeepRetiredWebhookPeriod: 0s
#
AcceptRejectsToMailbox:
#
MessageAuthRequiredSMTPError:
#
MaxOutgoingMessagesPerDay: 0
#
MaxFirstTimeRecipientsPerDay: 0
#
NoFirstTimeSenderDelay: false
#
NoCustomPassword: false
#
IMAPCapabilitiesDisabled:
#
DontRedirectPlainHTTP: false
#
ContinueNotFound: false
#
Examples #
Mox includes configuration files to illustrate common setups. You can see these
examples with "mox config example", and print a specific example with "mox
config example ". Below are all examples included in mox.
Example webhandlers #
mox.example: www.mox.example
#
Domain: www.mox.example
#
DontRedirectPlainHTTP: true
#
BaseURL: https://www.mox.example
#
Domain: www.mox.example
#
Domain: www.mox.example
#
PathRegexp: ^/redir/a/b/c
#
DontRedirectPlainHTTP: true
#
BaseURL: //moxest.example?q=1#frag
#
Domain: www.mox.example
#
OrigPathRegexp: ^/old/(.*)
#
Domain: www.mox.example
#
URL: http://127.0.0.1:8900/app-v2/
#
X-Content-Type-Options: nosniff
#
Example transport #
Username: user@example.com
#