diff options
| author | Joe Carstairs <me@joeac.net> | 2026-08-02 09:36:16 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-08-02 09:36:28 +0100 |
| commit | e6bbca473453a8d797060d97fe8ad3e729719b53 (patch) | |
| tree | 3224306c4bf061acdaaaeca889f4881eab28bc54 /mox | |
| parent | 7b75d7532e7b549efbe15c306f91ea67f2a5a4eb (diff) | |
move mox and ln from make to ansible
Diffstat (limited to 'mox')
| -rw-r--r-- | mox/.gitignore | 2 | ||||
| -rw-r--r-- | mox/README.md | 6 | ||||
| -rw-r--r-- | mox/config/domains.conf | 52 | ||||
| -rw-r--r-- | mox/config/mox.conf | 74 | ||||
| -rw-r--r-- | mox/dnssec.conf | 8 | ||||
| -rw-r--r-- | mox/install.mk | 63 | ||||
| -rw-r--r-- | mox/resolv.conf | 1 |
7 files changed, 0 insertions, 206 deletions
diff --git a/mox/.gitignore b/mox/.gitignore deleted file mode 100644 index b5c26c3..0000000 --- a/mox/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -config/dkim -config/adminpasswd diff --git a/mox/README.md b/mox/README.md deleted file mode 100644 index 86a609c..0000000 --- a/mox/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# 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 deleted file mode 100644 index 2ea54ec..0000000 --- a/mox/config/domains.conf +++ /dev/null @@ -1,52 +0,0 @@ -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: - - zen.spamhaus.org - - bl.spamcop.net diff --git a/mox/config/mox.conf b/mox/config/mox.conf deleted file mode 100644 index 76c3ce7..0000000 --- a/mox/config/mox.conf +++ /dev/null @@ -1,74 +0,0 @@ -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: /etc/letsencrypt/live/mail.joeac.net/fullchain.pem - KeyFile: /etc/letsencrypt/live/mail.joeac.net/privkey.pem - - - CertFile: /etc/letsencrypt/live/mta-sts.mail.joeac.net/fullchain.pem - KeyFile: /etc/letsencrypt/live/mta-sts.mail.joeac.net/privkey.pem - - - CertFile: /etc/letsencrypt/live/autoconfig.mail.joeac.net/fullchain.pem - KeyFile: /etc/letsencrypt/live/autoconfig.mail.joeac.net/privkey.pem - - - CertFile: /etc/letsencrypt/live/clientsettings.mail.joeac.net/fullchain.pem - KeyFile: /etc/letsencrypt/live/clientsettings.mail.joeac.net/privkey.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/dnssec.conf b/mox/dnssec.conf deleted file mode 100644 index 9b8cd35..0000000 --- a/mox/dnssec.conf +++ /dev/null @@ -1,8 +0,0 @@ -server: - auto-trust-anchor-file: /var/lib/unbound/root.key - qname-minimisation: yes - interface: 0.0.0.0 - access-control: 192.168.0.0/16 allow - -remote-control: - control-enable: yes diff --git a/mox/install.mk b/mox/install.mk deleted file mode 100644 index b7ca85b..0000000 --- a/mox/install.mk +++ /dev/null @@ -1,63 +0,0 @@ -.PHONY: install -install: install_unbound install_mox - -.PHONY: reinstall -reinstall: install_unbound install_mox - -.PHONY: install_unbound -install_unbound: /usr/sbin/unbound /etc/resolv.conf /var/lib/unbound/root.key install_unbound_anchor_crontab /etc/unbound/unbound.conf.d/dnssec.conf - -/usr/sbin/unbound: - sudo apk add unbound - sudo rc-update add unbound default - sudo rc-service unbound start - -/etc/resolv.conf: resolv.conf /etc/resolv.conf.joeac.net-backup - sudo cp resolv.conf /etc/resolv.conf - -/etc/resolv.conf.joeac.net-backup: - sudo mv /etc/resolv.conf /etc/resolv.conf.joeac.net-backup - -/var/lib/unbound/root.key: - sudo mkdir -p /var/lib/unbound && sudo unbound-anchor -a /var/lib/unbound/root.key - -UNBOUND_ANCHOR_CRONTAB_ENTRY := @reboot unbound-anchor -a /var/lib/unbound/root.key # managed by joeac.net -IS_CRONTAB_UP_TO_DATE := $(sudo grep "$(UNBOUND_ANCHOR_CRONTAB_ENTRY)" /etc/crontabs/root) -.PHONY: install_unbound_anchor_crontab -install_unbound_anchor_crontab: - $(if $(IS_CRONTAB_UP_TO_DATE),,\ - sudo crontab -l > crontab.tmp; \ - sed -i "s/.*unbound-anchor.*# managed by joeac.net//" crontab.tmp; \ - echo "$(UNBOUND_ANCHOR_CRONTAB_ENTRY)" >> crontab.tmp; \ - sudo crontab crontab.tmp; \ - rm crontab.tmp; \ - ) - -/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) -MOX_TLS_CERTS := /etc/letsencrypt/live/mail.joeac.net/fullchain.pem /etc/letsencrypt/live/autoconfig.mail.joeac.net/fullchain.pem /etc/letsencrypt/live/clientsettings.mail.joeac.net/fullchain.pem /etc/letsencrypt/live/mta-sts.mail.joeac.net/fullchain.pem -.PHONY: install_mox -install_mox: /usr/local/bin/mox ~/mox/config/mox.conf ~/mox/config/domains.conf ~/mox/config/adminpasswd ~/mox/data $(DKIM_PRIVATE_KEYS) $(MOX_TLS_CERTS) - -MOX_PLATFORM := $(if $(filter armv7% arm32%,$(CPU_ARCH)),arm,amd64) -MOX_VERSION := 0.0.15 -MOX_GO_VERSION := 1.26.4 -MOX_CHECKSUM_amd64_v0.0.15_go1.26.4 := 09OE-1QkNVgmpoRj53mtX9gxoEmY -MOX_CHECKSUM_arm_v0.0.15_go1.26.4 := 038X9nQx6hhai60Fk1BhcP3r6Mew -MOX_CHECKSUM := $(MOX_CHECKSUM_$(MOX_PLATFORM)_v$(MOX_VERSION)_go$(MOX_GO_VERSION)) -MOX_URL_BASE := https://beta.gobuilds.org/github.com/mjl-/mox -MOX_URL := $(MOX_URL_BASE)@v$(MOX_VERSION)/linux-$(MOX_PLATFORM)-go$(MOX_GO_VERSION)/$(MOX_CHECKSUM) -/usr/local/bin/mox: - wget -O- $(MOX_URL) | gzip -d > mox - chmod +x mox - sudo mv mox /usr/local/bin/mox - -~/mox/config/%: config/% - mkdir -p $(dir $@) && cp $< $@ - -~/mox/data: - mkdir -p $@ diff --git a/mox/resolv.conf b/mox/resolv.conf deleted file mode 100644 index b3cb117..0000000 --- a/mox/resolv.conf +++ /dev/null @@ -1 +0,0 @@ -nameserver: 127.0.0.1 |
