summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/algo-config2
-rwxr-xr-xbin/helpers/launch-mail10
-rwxr-xr-xbin/secrets2
-rw-r--r--modules/mail/files/mailu.env4
-rw-r--r--modules/mail/manifests/mailu.pp8
5 files changed, 13 insertions, 13 deletions
diff --git a/bin/algo-config b/bin/algo-config
index ca414b9..dcd53e5 100755
--- a/bin/algo-config
+++ b/bin/algo-config
@@ -46,7 +46,7 @@ sed -i 's|^\(Address.*\),.*|\1|' "$config_path"/mail.conf
cp "$config_path"/mail.conf "$config_path"/mail-not-captive.conf
sed -i 's|^AllowedIPs.*|AllowedIPs = 0.0.0.0/0|' "$config_path"/mail.conf
sed -i 's|^AllowedIPs.*|AllowedIPs = 10.19.49.0/24, 172.16.0.1/32|' "$config_path"/mail-not-captive.conf
-scp "$config_path"/mail-not-captive.conf root@newsmtp.tozt.net:/etc/wireguard/algo.conf
+scp "$config_path"/mail-not-captive.conf root@mail.tozt.net:/etc/wireguard/algo.conf
cp "$config_path"/mail-not-captive.conf /mnt/puppet/mail/wireguard
$secrets_bin sync mail
diff --git a/bin/helpers/launch-mail b/bin/helpers/launch-mail
index abbd073..bdc541e 100755
--- a/bin/helpers/launch-mail
+++ b/bin/helpers/launch-mail
@@ -14,7 +14,7 @@ record_id=$(doctl \
tozt.net \
--format Name,Type,ID \
--no-header \
- | grep '^newsmtp \+A ' \
+ | grep '^smtp \+A ' \
| awk '{print $3}'
)
doctl \
@@ -23,7 +23,7 @@ doctl \
tozt.net \
--record-id "$record_id" \
--record-type A \
- --record-name newsmtp \
+ --record-name smtp \
--record-data "$ip" \
--record-ttl 600
echo "Done creating DNS entry"
@@ -31,14 +31,14 @@ echo "Done creating DNS entry"
provision_droplet mail
echo "Creating DKIM entry"
-dkim=$(remote "perl -pe'chomp; s/.*\"(.*)\".*/\$1/' /media/persistent/dkim/new.tozt.net.dkim.pub")
+dkim=$(remote "perl -pe'chomp; s/.*\"(.*)\".*/\$1/' /media/persistent/dkim/tozt.net.dkim.pub")
dkim_record_id=$(doctl \
-t "$(cat /mnt/digitalocean)" \
compute domain records list \
tozt.net \
--format Name,Type,ID \
--no-header \
- | grep '^dkim._domainkey.new \+TXT ' \
+ | grep '^dkim._domainkey \+TXT ' \
| awk '{print $3}'
)
doctl \
@@ -47,7 +47,7 @@ doctl \
tozt.net \
--record-id "$dkim_record_id" \
--record-type TXT \
- --record-name dkim._domainkey.new \
+ --record-name dkim._domainkey \
--record-data "$dkim" \
--record-ttl 600
echo "Done creating DKIM entry"
diff --git a/bin/secrets b/bin/secrets
index d7a5dfd..244431c 100755
--- a/bin/secrets
+++ b/bin/secrets
@@ -34,7 +34,7 @@ cmd_sync() {
if [ "${host}" = "tozt" ]; then
hostname=tozt.net
elif [ "${host}" = "mail" ]; then
- hostname=newsmtp.tozt.net
+ hostname=mail.tozt.net
elif [ "${host}" = "partofme" ]; then
hostname=partofme
else
diff --git a/modules/mail/files/mailu.env b/modules/mail/files/mailu.env
index c976f33..62b1347 100644
--- a/modules/mail/files/mailu.env
+++ b/modules/mail/files/mailu.env
@@ -1,7 +1,7 @@
VERSION=1.6
SUBNET=192.168.203.0/24
-DOMAIN=new.tozt.net
-HOSTNAMES=newsmtp.tozt.net
+DOMAIN=tozt.net
+HOSTNAMES=mail.tozt.net
POSTMASTER=admin
TLS_FLAVOR=letsencrypt
AUTH_RATELIMIT=10/minute;1000/hour
diff --git a/modules/mail/manifests/mailu.pp b/modules/mail/manifests/mailu.pp
index c1a2b50..9f6d624 100644
--- a/modules/mail/manifests/mailu.pp
+++ b/modules/mail/manifests/mailu.pp
@@ -44,12 +44,12 @@ class mail::mailu {
exec { "generate dkim keys":
provider => shell,
command => "
- opendkim-genkey -s dkim -d new.tozt.net
- mv dkim.private /media/persistent/dkim/new.tozt.net.dkim.key
- mv dkim.txt /media/persistent/dkim/new.tozt.net.dkim.pub
+ opendkim-genkey -s dkim -d tozt.net
+ mv dkim.private /media/persistent/dkim/tozt.net.dkim.key
+ mv dkim.txt /media/persistent/dkim/tozt.net.dkim.pub
",
cwd => "/media/persistent",
- creates => "/media/persistent/dkim/new.tozt.net.dkim.key",
+ creates => "/media/persistent/dkim/tozt.net.dkim.key",
require => [
Class["haveged"],
Package["opendkim"],