Help for "error loading key" '143'

From: Simone Caruso <>
Date: Mon, 19 Nov 2012 19:34:29 +0100

I'm studing opendkim to sign outgoing email from my relay server (all works with
flat files) but i have to sign emails for about 200 domains.. so i compiled
opendkim with libodbx/mysql support.

With the SQL config i get always the error "error loading key '143'" where 143
is the database ID of my test domain.

My configurazion is:
logwhy true
Syslog yes
UMask 002
OversignHeaders From
Socket inet:8891_at_localhost

the "domains" is a simple table (id as PK, and name as VARCHAR()).
"dkim_sign" is a view that joins "dkim_keys" with my "domains" table.

I got the following SQL queries from MySQL general-log:
SELECT id FROM domains WHERE name = ''
SELECT id FROM domains WHERE name = ''
SELECT domain_name,selector,private_key FROM dkim_sign WHERE id = '143'

Results are:
| id |
| 143 |


| | s1 | /var/dkim/keys/s1.private |

I tried inserting the content of the KEY into the DB like this:
insert into records (domain_id, name, type, content) values (102,
'', 'TXT', 'v=DKIM1; k=rsa;

But i get always the same error! ("error loading key" '143')
Using flat files it goes well (the keyfile is world readable).


Simone Caruso
IT Consultant
+39 349 65 90 805
Received on Mon Nov 19 2012 - 18:34:41 PST

This archive was generated by hypermail 2.3.0 : Mon Nov 19 2012 - 18:45:01 PST