diff --git a/create_opendkim_key.sh b/create_opendkim_key.sh index 797b330..6b1266e 100755 --- a/create_opendkim_key.sh +++ b/create_opendkim_key.sh @@ -316,6 +316,22 @@ done < "${key_dir}/${time_stamp}.public" echo " )" >> ${key_dir}/${time_stamp}.bind9 echo_ok +# - Write TXT record as string for 'nsupdate' +# - +echo " Write TXT record as string for 'nsupdate' to file" +echononl " '${key_dir}/${time_stamp}.nsupdate'" +echo -n "\"v=DKIM1; k=rsa; s=email; p=\"" >> ${key_dir}/${time_stamp}.nsupdate +while IFS='' read -r _line || [[ -n $_line ]] ; do + + if echo "$_line" | grep -i -q -E "^---" 2> /dev/null ; then + continue + fi + + echo -n " \"$_line\"" >> ${key_dir}/${time_stamp}.nsupdate + +done < "${key_dir}/${time_stamp}.public" +echo_ok + info "Now you have to add the TXT Record to your zone file.\n\n\t Copy/Paste the following data:\n\n$(cat ${key_dir}/${time_stamp}.bind9)" echo ""