Copy/Paste-able txt record for OpenDKIM

opendkim-genkey generates a mail.txt file containing a bind-compatible txt entry. It’s not particularly friendly to copy and paste into another DNS management interface. This makes life a little easier:

cat mail.txt | sed 's/\t\|"//g' | sed 's/^\s*//g' | tr -d '\n' | sed 's/.*(\(.*\)).*/\1/g'

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *