commit 5423a0b848627656af8a330c3c460d549ca4de5b parent ec899f29fc79ebd25340a3e078f28cb3a361e0b1 Author: Hayden Hamilton <hayden@hhvn.uk> Date: Sun, 24 May 2026 23:10:02 +0100 Create dkim/purge Diffstat:
| A | dkim/purge | | | 17 | +++++++++++++++++ |
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/dkim/purge b/dkim/purge @@ -0,0 +1,17 @@ +#!/bin/rc -e + +# This script utilizes lscert and rmcert to +# remove all but the most recent selector +# Despite other scripts supporting arbitrary selectors, +# this script enforces a # YYYYMMDD format for selectors. + +# Check format +for (s in `{dkim/lscert}) { + echo $s | grep -E '^[0-9]{8}$' >/dev/null +} + +old = `{dkim/lscert | sort -r | tail -n +2} +for (s in $old) { + echo RMCERT $s + dkim/rmcert $s +}