I configured OpenDKIM following the guidelines here:
https://www.linuxbabe.com/mail-server/setting-up-dkim-and-spf
Rather than generate keys I used those already configured on our domain, that were generated in the Gmail admin portal.
Everything looked OK until mail came in that should be signed, at which point I get this in the logs:
Sep 27 15:00:05 kattos opendkim[6210]: 2283C43B35: SSL error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag; error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error; error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag; error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error; error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib; error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag; error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error
The keys all check out fine when tested on the command line using opendkim-testkey
:
root@kattos:~# opendkim-testkey -d myhostedfax.co.uk -s google -vvv
opendkim-testkey: using default configfile /etc/opendkim.conf
opendkim-testkey: checking key 'google._domainkey.myhostedfax.co.uk'
opendkim-testkey: key not secure
opendkim-testkey: key OK
Not really sure to go with this next and would appreciate any guidance.