Ok, i’ve gotten this error while trying to implement DomainKeys on one of my servers.  I’m using a debian etch with postfix amavis and dk-filter for signing emails. The errors i was getting in the logfiles were:

dk_eom(): resource unavailable: d2i_PUBKEY_bio() failed
SSL error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data

After searching a while over the internet i’ve figured out i was getting this error because the selector TXT DNS record was incomplete. I am using ISPconfig3 with MyDNS and the MyDNS field in the ispconfig database was limited to 116 characters. The TXT DNS record had 230. I had to modify the database structure.

This error can also occur when you copy/paste the public key from your public key file to the dns record. Be careful not to have any white-spaces or line-breaks in it.

After fixing your selector wait for the dns to refresh so it’ll see your new dns record.

Hope this helps you out cause i lost half a day trying to figure it out.