# DKIM setup produces an invalid DKIM DNS record

**URL:** <https://forums.interworx.com/t/dkim-setup-produces-an-invalid-dkim-dns-record/13330>\
**Category:** Bugs\
**Created:** [August 11, 2013, 10:50am UTC](https://forums.interworx.com/t/dkim-setup-produces-an-invalid-dkim-dns-record/13330 "2013-08-11T10:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eviljim](https://forums.interworx.com/user_avatar/forums.interworx.com/eviljim/32/73_2.png) [@eviljim](https://forums.interworx.com/u/eviljim)\
**Post date:** [August 11, 2013, 10:50am UTC](https://forums.interworx.com/t/dkim-setup-produces-an-invalid-dkim-dns-record/13330/1 "2013-08-11T10:50:42Z")

</div>

There’s a small (but probably good to fix) bug in DKIM setup that produces invalid DKIM records.

Specifically, a record is created along the lines of:

k=rsa; v=DKIM1; o=-; p=…

If the v= tag is present it MUST be the first entry in the record, per the DKIM RFC. Interworx should make sure that the v= is first.

Aside from that, but not technically an error, is the o= value isn’t defined so it’s unclear why interworx adds it. The RFC explicitly states clients must be okay with extra key/value pairs, so it shouldn’t affect operability. But it’s odd that it’s there.

Also, it creates a bare “\_domainkey.domain.com” record with just “v=DKIM1; o=-;” as the contents. I am not entirely sure on the spec to know if this record makes sense, but it doesn’t seem to from what I know.
