When receiving from a DKIM-enabled server, say google, we expect to see the Authentication-Results header with a dkim=pass flag. Instead, we get no header at all, and the log has info for us:
Sep 15 20:03:25 example opendkim[324]: 42CCCDB291BA: mail-wm0-f53.google.com [74.125.82.53] not internal Sep 15 20:03:25 example opendkim[324]: 42CCCDB291BA: not authenticated Sep 15 20:03:25 example opendkim[324]: 42CCCDB291BA: signature=fSALpjTU domain=gmail.com selector=20120113 result="key DNS query failed" Sep 15 20:03:25 example opendkim[324]: 42CCCDB291BA: key retrieval failed (s=20120113, d=gmail.com): '20120113._domainkey.gmail.com' query failed
However, the DNSs are just fine:
unbound-host -rvD -tTXT 20120113._domainkey.gmail.com
20120113._domainkey.gmail.com has TXT record "k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1Kd87/UeJjenpabgbFwh+eBCsSTrqmwIYYvywlbhbqoo2DymndFkbjOVIPIldNs/m40KF+yzMn1skyoxcTUGCQs8g3FgD2Ap3ZB5DekAo5wMmk4wimDO+U8QzI3SD0" "7y2+07wlNWwIt8svnxgdxGkVbbhzY8i+RQ9DpSVpPbF7ykQxtKXkv/ahW3KjViiAH+ghvvIhkx4xYSIc9oSwVmAl5OctMEeWUwg8Istjqz8BZeTWbf41fbNhte7Y+YqZOwq1Sd0DbvYAD9NOZK9vlfuac0598HY+vtSBczUiKERHv1yRbcaQtZFh5wtiRrN04BLUTD21MycBX5jYchHjPY/wIDAQAB" (insecure)
Please send instructions on how to identify the problem.
runtime configuration
object dump
config options:
Last edit: Ruga 2016-09-17
Results obtained for third-party incoming mail using "UnprotectedKey none"
e-mail without dkim signature:
header: "Authentication-Results: example.com; dkim=none" <------ OK
log: "not internal" and "not authenticated"
e-mail with dkim signature:
header: "Authentication-Results: example.com; dkim=[...]" is not included <------------ :-(
log: identical to the OP, with ""key DNS query failed" <----------------------------------------
Results obtained for third-party incoming mail using "UnprotectedKey neutral"
identical to the above
Results obtained for third-party incoming mail using "UnprotectedKey fail"
identical to the above
Last edit: Ruga 2016-09-16
>opendkim -b v -v -v -t ~/ham4.eml
The above verification test (-b v) also prints a "DEBUG-i: no signin table match for 'example@gmail.com'", which fact is not supposed to happen.
Last edit: Ruga 2016-09-17
ldns test
Last edit: Ruga 2016-09-17
opendkim/test.c line 742:
result:
The verification test fails with "key DNS query failed", because "DKIM_SIGBH_MISMATCH:1".
The same test also logs "DEBUG-i: no signin table match for 'example@gmail.com'".
So, is it a DNS query error, a BH mismatch, or the ill attempt to sign during a verification test?
Last edit: Ruga 2016-10-03
opendkim/opendkim-dns.c
The resulting execution shows that the above function is not executed.
The DNS query error is an error local to opendkim.
Last edit: Ruga 2016-10-03
[...]
debug: ub= ubdata=
[...]
opendkim: /Users/x/ham4.eml: verification (s=20120113 d=gmail.com, 0-bit key, unknown) failed: key DNS query failed
opendkim: /Users/x/ham4.eml: flags: 2; DKIM_SIGFLAG_PASSED:4; bh:4294967295; DKIM_SIGBH_MISMATCH:1; errcode:24; DKIM_SIGERROR_OK:0; dnsseccode:-1
opendkim: mlfi_close() returned SMFIS_CONTINUE
Last edit: Ruga 2016-10-03
With "MilterDebug 99" I get nothing useful as to why it does not even send the query for 20161025.domainkey.gmail.com.
Yes my nameserver at 127.0.0.1 works when I query it.
Created: 2016-09-15
Today: 2018-01-29
Problem pending, and no comment from the developers.