#!/bin/bash # Debian uses the /etc/dkimkeys/ directory but the upstream recommends using # /var/db/dkim/. key_directory=/etc/dkimkeys/sigexec.com/ if [ $# -lt 1 ]; then >&2 echo "Usage: $0 selector" exit 1 fi selector=$1 mkdir --parents -- "${key_directory}" opendkim-genkey \ -D "${key_directory}" \ -d sigexec.com \ -s "$selector" \ -r