Menu

#219 KEYFAIL returned for permanent error

2.7.0
closed-fixed
None
5
2015-02-04
2015-01-14
Ale Vesely
No

libopendkim/dkim-keys.c (about line 358) returns DKIM_STAT_KEYFAIL if no useful record was returned, assuming that "'%s' reply was unresolved CNAME". Returning DKIM_STAT_NOKEY would seem more consistent to me, since there was no DNS hiccup in such case.

Distinguishing between temporary and permanent errors is useful if the MTA would return 4xx in the former case, while just failing DKIM verification in the latter one. The latter, in turn may be treated with a 5xx reply, depending on local policies.

I have not yet confirmed that this is an actual problem, but it might.

Discussion

  • Ale Vesely

    Ale Vesely - 2015-01-15

    By logging the string returned by dkim_geterror(), I the problem is confirmed. The log line contains:

    'k1._domainkey.defmix.com' reply was unresolved CNAME

    The message is related to MailChimp, who suggest to set CNAME record for DKIM. The more that kind of setting takes root, the more occurrences of this outcome are likely to come about.

    As a workaround, strstr(dkim_geterror(), "CNAME") can be used to disambiguate.

     
  • Murray S. Kucherawy

    • assigned_to: Murray S. Kucherawy
     
  • Murray S. Kucherawy

    Interestingly enough, your position appears to agree with RFC6604. I seem to remember that this was actually a recent change, but I couldn't find it in the RELEASE_NOTES.

    Done for next release.

     
  • Murray S. Kucherawy

    2.10.1 released.

     
  • Murray S. Kucherawy

    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB