summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayden Hamilton <hayden@hhvn.uk>2026-05-24 23:09:49 +0100
committerHayden Hamilton <hayden@hhvn.uk>2026-05-24 23:09:49 +0100
commitec899f29fc79ebd25340a3e078f28cb3a361e0b1 (patch)
tree1acfe4e69b104a93c874faf6ecac0f988fadccb1
parent5013f322b444e653b5c403d3985407569aacc613 (diff)
Create dkim/lscert
-rwxr-xr-xdkim/lscert23
1 files changed, 23 insertions, 0 deletions
diff --git a/dkim/lscert b/dkim/lscert
new file mode 100755
index 0000000..cfb0d38
--- /dev/null
+++ b/dkim/lscert
@@ -0,0 +1,23 @@
+#!/bin/rc
+
+# This script finds stored DKIM certificates and lists their selectors
+
+dir = /etc/mail/dkim
+user = _dkimsign
+
+fn err {
+ echo $* >[1=2]
+}
+
+if (!~ $#* 0) {
+ err 'usage: dkim/lscert'
+ exit 2
+}
+
+fn as {
+ doas -u $user $*
+}
+
+for (f in `$nl{as find $dir -type f | sed 's/\..*//' | sort | uniq}) {
+ basename $f
+}