aboutsummaryrefslogtreecommitdiff
path: root/mox
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-07-05 23:16:05 +0100
committerJoe Carstairs <me@joeac.net>2026-07-05 23:18:11 +0100
commit639196f0c9cb2fd972897a7652f903b11f9154d1 (patch)
treec2aac30d05f3dc7b75f63f6616291b2ce48557cd /mox
parent404cb2d98c0fbdef83b35e8fe995972fa8b47531 (diff)
install mox config
Diffstat (limited to 'mox')
-rw-r--r--mox/.gitignore2
-rw-r--r--mox/README.md6
-rw-r--r--mox/config/domains.conf52
-rw-r--r--mox/config/mox.conf74
-rw-r--r--mox/install.mk9
5 files changed, 140 insertions, 3 deletions
diff --git a/mox/.gitignore b/mox/.gitignore
new file mode 100644
index 0000000..b5c26c3
--- /dev/null
+++ b/mox/.gitignore
@@ -0,0 +1,2 @@
+config/dkim
+config/adminpasswd
diff --git a/mox/README.md b/mox/README.md
new file mode 100644
index 0000000..86a609c
--- /dev/null
+++ b/mox/README.md
@@ -0,0 +1,6 @@
+# mox
+
+There are three secrets required for mox. One is the admin password, which
+should be stored in config/adminpasswd. The other two are DKIM private keys,
+which should be stored in the config/dkim directory. The public parts of these
+keys should be exposed in DNS TXT records.
diff --git a/mox/config/domains.conf b/mox/config/domains.conf
new file mode 100644
index 0000000..7901311
--- /dev/null
+++ b/mox/config/domains.conf
@@ -0,0 +1,52 @@
+Domains:
+ mail.joeac.net:
+ ClientSettingsDomain: clientsettings.mail.joeac.net
+ LocalpartCatchallSeparator: +
+ DKIM:
+ Selectors:
+ 2026a:
+ Expiration: 72h
+ PrivateKeyFile: dkim/2026a._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
+ 2026b:
+ Expiration: 72h
+ PrivateKeyFile: dkim/2026b._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
+ Sign:
+ - 2026a
+ DMARC:
+ Localpart: dmarcreports
+ Account: me
+ Mailbox: DMARC
+ MTASTS:
+ PolicyID: 20260705T153220
+ Mode: enforce
+ MaxAge: 24h0m0s
+ MX:
+ - mail.joeac.net
+ TLSRPT:
+ Localpart: tlsreports
+ Account: me
+ Mailbox: TLSRPT
+Accounts:
+ me:
+ Domain: mail.joeac.net
+ Destinations:
+ me@mail.joeac.net: nil
+ SubjectPass:
+ Period: 12h0m0s
+ RejectsMailbox: Rejects
+ AutomaticJunkFlags:
+ Enabled: true
+ JunkMailboxRegexp: ^(junk|spam)
+ NeutralMailboxRegexp: ^(inbox|neutral|postmaster|dmarc|tlsrpt|rejects)
+ JunkFilter:
+ Threshold: 0.950000
+ Params:
+ Onegrams: true
+ MaxPower: 0.010000
+ TopWords: 10
+ IgnoreWords: 0.100000
+ RareWords: 2
+ NoCustomPassword: true
+MonitorDNSBLs:
+ - sbl.spamhaus.org
+ - bl.spamcop.net
diff --git a/mox/config/mox.conf b/mox/config/mox.conf
new file mode 100644
index 0000000..1ca60ff
--- /dev/null
+++ b/mox/config/mox.conf
@@ -0,0 +1,74 @@
+DataDir: ../data
+LogLevel: debug
+User: mox
+Hostname: mail.joeac.net
+AdminPasswordFile: adminpasswd
+Listeners:
+ internal:
+ IPs:
+ - 127.0.0.1
+ - ::1
+ Hostname: localhost
+ AccountHTTP:
+ Enabled: true
+ Port: 1080
+ Forwarded: true
+ AdminHTTP:
+ Enabled: true
+ Port: 1080
+ Forwarded: true
+ WebmailHTTP:
+ Enabled: true
+ Port: 1080
+ Forwarded: true
+ WebAPIHTTP:
+ Enabled: true
+ Port: 1080
+ Forwarded: true
+ MetricsHTTP:
+ Enabled: true
+ AutoconfigHTTPS:
+ Enabled: true
+ Port: 81
+ NonTLS: true
+ MTASTSHTTPS:
+ Enabled: true
+ Port: 81
+ NonTLS: true
+ WebserverHTTP:
+ Enabled: true
+ Port: 81
+ public:
+ IPs:
+ - 192.168.178.75
+ - fdc9:6aec:7a18:0:2e0:4cff:fe61:9b17
+ NATIPs:
+ - 217.155.190.42
+ - fdc9:6aec:7a18:0:2e0:4cff:fe61:9b17
+ TLS:
+ KeyCerts:
+ -
+ CertFile: path/to/mail.joeac.net-chain.crt.pem
+ KeyFile: path/to/mail.joeac.net.key.pem
+ -
+ CertFile: path/to/mta-sts.mail.joeac.net-chain.crt.pem
+ KeyFile: path/to/mta-sts.mail.joeac.net.key.pem
+ -
+ CertFile: path/to/autoconfig.mail.joeac.net-chain.crt.pem
+ KeyFile: path/to/autoconfig.mail.joeac.net.key.pem
+ -
+ CertFile: path/to/clientsettings.mail.joeac.net-chain.crt.pem
+ KeyFile: path/to/clientsettings.mail.joeac.net.key.pem
+ SMTP:
+ Enabled: true
+ Submissions:
+ Enabled: true
+ IMAPS:
+ Enabled: true
+Postmaster:
+ Account: me
+ Mailbox: Postmaster
+HostTLSRPT:
+ Account: me
+ Mailbox: TLSRPT
+ Localpart: tlsreports
diff --git a/mox/install.mk b/mox/install.mk
index 8f0c7dd..f175812 100644
--- a/mox/install.mk
+++ b/mox/install.mk
@@ -33,8 +33,11 @@ install_unbound_anchor_crontab:
/etc/unbound/unbound.conf.d/dnssec.conf: dnssec.conf
sudo mkdir -p $(dir $@) && sudo cp $< $@
+DKIM_PRIVATE_KEY_A := ~/mox/config/dkim/2026a._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
+DKIM_PRIVATE_KEY_B := ~/mox/config/dkim/2026b._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
+DKIM_PRIVATE_KEYS := $(DKIM_PRIVATE_KEY_A) $(DKIM_PRIVATE_KEY_B)
.PHONY: install_mox
-install_mox: /usr/local/bin/mox /home/mox/config/domains.conf
+install_mox: /usr/local/bin/mox ~/mox/config/adminpasswd $(DKIM_PRIVATE_KEYS)
MOX_PLATFORM := $(if $(filter armv7% arm32%,$(CPU_ARCH)),arm,amd64)
MOX_VERSION := 0.0.15
@@ -49,5 +52,5 @@ MOX_URL := $(MOX_URL_BASE)@v$(MOX_VERSION)/linux-$(MOX_PLATFORM)-go$(MOX_GO_VERS
chmod +x mox
sudo mv mox /usr/local/bin/mox
-/home/mox/config/domains.conf:
- $(error Now configure mox for mail.joeac.net. To get started, create a user 'mox' if there isn't one already, cd to /home/mox, and run 'mox -hostname mail.joeac.net -existing-webserver quickstart me@mail.joeac.net'. See https://www.xmox.nl for more information on how to configure mox.)
+~/mox/config/%: config/%
+ mkdir -p $(dir $@) && cp $< $@