mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
850f4444d4
people will either paste the records in their zone file. in that case, the records will inherit "IN" from earlier records, and there will always be one record. if anyone uses a different class, their smart enough to know they need to add IN manually. plenty of people will add their records through some clunky web interface of their dns operator. they probably won't even have the choice to set the class, it'll always be IN.
37 lines
1.3 KiB
Bash
Executable file
37 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
set -x # print commands
|
|
set -e # exit on failed command
|
|
|
|
apk add unbound
|
|
|
|
(rm -r /tmp/mox 2>/dev/null || exit 0) # clean slate
|
|
mkdir /tmp/mox
|
|
cd /tmp/mox
|
|
mox quickstart moxtest2@mox2.example "$MOX_UID" > output.txt
|
|
|
|
cp config/mox.conf config/mox.conf.orig
|
|
sed -i -e 's,ACME: .*$,KeyCerts:\n\t\t\t\t-\n\t\t\t\t\tCertFile: /integration/tls/moxmail2.pem\n\t\t\t\t\tKeyFile: /integration/tls/moxmail2-key.pem\n\t\t\t\t-\n\t\t\t\t\tCertFile: /integration/tls/mox2-autoconfig.pem\n\t\t\t\t\tKeyFile: /integration/tls/mox2-autoconfig-key.pem\n\t\t\t\t-\n\t\t\t\t\tCertFile: /integration/tls/mox2-mtasts.pem\n\t\t\t\t\tKeyFile: /integration/tls/mox2-mtasts-key.pem\n,' -e 's/SMTP:$/SMTP:\n\t\t\tFirstTimeSenderDelay: 1s/' config/mox.conf
|
|
cat <<EOF >>config/mox.conf
|
|
|
|
TLS:
|
|
CA:
|
|
CertFiles:
|
|
# CA of our own certificates.
|
|
- /integration/tls/ca.pem
|
|
# CA used by moxacmepebble.
|
|
- /integration/tmp-pebble-ca.pem
|
|
EOF
|
|
|
|
# A fresh file was set up by moxacmepebble.
|
|
sed -n '/^;/,/CAA /p' output.txt >>/integration/example-integration.zone
|
|
unbound-control -s 172.28.1.30 reload # reload unbound with zone file changes
|
|
|
|
mox -checkconsistency serve &
|
|
while true; do
|
|
if test -e data/ctl; then
|
|
echo -n accountpass4321 | mox setaccountpassword moxtest2
|
|
break
|
|
fi
|
|
sleep 0.1
|
|
done
|
|
wait
|