With opendkim-genzone I can't add record for email signing only, as I do with opendkim-genkey.
With this patch I add the -M flag, which allows to add the email signing only flag to all keys.
The patch you've provided doesn't address all issues. First of all, the TXT entry needs to be broken into 255 char chunks. Second, the semicolons need escaping. Third, it doesn't change all the places where the TXT entry is output. Also, the malloc:ed memory is not necessary and it's never freed.
So I took the liberty of creating an updated version of the patch which fixes all these issues.
The nsupdate output doesn't contain the first part of the record ("v=DKIM1; k=rsa; p=").
I have updated the initial patch including this fix.
Last edit: Marco Favero 2016-06-06
The patch you've provided doesn't address all issues. First of all, the TXT entry needs to be broken into 255 char chunks. Second, the semicolons need escaping. Third, it doesn't change all the places where the TXT entry is output. Also, the malloc:ed memory is not necessary and it's never freed.
So I took the liberty of creating an updated version of the patch which fixes all these issues.