diff options
Diffstat (limited to 'dkim')
| -rwxr-xr-x | dkim/purge | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dkim/purge b/dkim/purge new file mode 100755 index 0000000..c631028 --- /dev/null +++ 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 +} |