summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-03-04 22:44:01 -0500
committerJesse Luehrs <doy@tozt.net>2019-03-04 22:44:01 -0500
commit29b16cfc309ab74f4927834a292c03fa0af1b56b (patch)
treec72772f7c5c1126aae3d02babe86e162cb6f8ee2 /bin
parent5f0400bdbc4f851d95f58c47bb763e9b380f22f1 (diff)
downloadpuppet-tozt-29b16cfc309ab74f4927834a292c03fa0af1b56b.tar.gz
puppet-tozt-29b16cfc309ab74f4927834a292c03fa0af1b56b.zip
launch mail server with the real domain name
Diffstat (limited to 'bin')
-rwxr-xr-xbin/algo-config2
-rwxr-xr-xbin/helpers/launch-mail10
-rwxr-xr-xbin/secrets2
3 files changed, 7 insertions, 7 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