src.hhvn.uk > hhvn.uk-scripts > commit > 6a893c278e344a149c1082fe547572fcbe063a6c

scripts that power hhvn.uk
Log | Files | Refs | README

commit 6a893c278e344a149c1082fe547572fcbe063a6c
parent e6f93e5c93349d0649142ce21de47301038767a2
Author: Hayden Hamilton <hayden@hhvn.uk>
Date:   Mon, 25 May 2026 10:15:45 +0100

Create dkim/update

Diffstat:
Adkim/update | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/dkim/update b/dkim/update @@ -0,0 +1,22 @@ +#!/bin/rc -ex + +# This script combines other scripts in this directory to automatically +# generate keypairs and reconfigure relevant servers to use them + +selector = `{date +%Y%m%d} +dkimfiles = `{dkim/mkcert $selector} +rsapriv = $dkimfiles(1) +rsatxt = $dkimfiles(2) +edpriv = $dkimfiles(3) +edtxt = $dkimfiles(4) +domain = $1 +zonefile = $2 + +if (test $#* -gt 2) { + echo 'usage: dkim/update [domain] [zonefile]' >[1=2] + exit 2 +} + +dkim/reconfig-smtpd $rsapriv $edpriv $domain +dkim/reconfig-dns $rsatxt $edtxt $selector $domain $zonefile +dkim/purge