# DKIM key was provided incorrect

**URL:** <https://meta.discourse.org/t/dkim-key-was-provided-incorrect/23931>\
**Category:** Product Support\
**Created:** [2015 年 1 月 13 日午前 2:38 UTC](https://meta.discourse.org/t/dkim-key-was-provided-incorrect/23931 "2015-01-13T02:38:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2015 年 1 月 14 日午前 2:45 UTC](https://meta.discourse.org/t/dkim-key-was-provided-incorrect/23931/5 "2015-01-14T02:45:29Z")

</div>

> [@codinghorror](#):
>
> DKIM checks out too

Ah - this is the problem. The DKIM record is syntactically correct but is set up using the wrong key.

The records should look like:

```plaintext
discourse._domainkey.brightstorm.com IN TXT "v=DKIM1\; k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCojtk3fqF69pT6SZcIwoYzjQfdOBTFK7AOyxEGBwHLZ+xqwQQlVgfL6xFZ7FhCYAczkGTCjdChX/qf6dg4LrtXrb+apymj9WpLOwPir6P5Mv9FH3t3BgrQeyyCLhAHqDrUk+kU3B2z1uva3oWw3qN9MLZaX8HjR13w9ywVEgzjpQIDAQAB"
mandrill._domainkey.brightstorm.com IN TXT "v=DKIM1\; k=rsa\; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrLHiExVd55zd/IQ/J/mRwSRMAocV/hMB3jXwaHH36d9NaVynQFYV8NaWi69c1veUtRzGt7yAioXqLj7Z4TeEUoOLgrKsn8YnckGs9i3B3tVFB+Ch/4mPhXWiNfNdynHWBcPcbJ8kjEQ2U8y78dHZj1YeRXXVvWob2OaKynO8/lQIDAQAB"

```

The reason the signature check is failing is that _our_ signature is trying to be verified against the _mandrill_ public key - that ain’t gonna fly.

For future reference, the result we get from a DKIM check for a hosted domain should be:

```plaintext
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCojtk3fqF69pT6SZcI
woYzjQfdOBTFK7AOyxEGBwHLZ+xqwQQlVgfL6xFZ7FhCYAczkGTCjdChX/qf6dg4LrtXrb+apy
mj9WpLOwPir6P5Mv9FH3t3BgrQeyyCLhAHqDrUk+kU3B2z1uva3oWw3qN9MLZaX8HjR13w9ywV
EgzjpQIDAQAB

Version
    v=	DKIM1
Key type
    k=	rsa
Public key
    p= MIGfMA0GCSqG...jR13w9ywVEgzjpQIDAQAB

```

> [@ihwan](#):
>
> I set up our domain and SPF, DKIM. But it is only sending a email to [user@brightstorm.com](mailto:user@brightstorm.com) I tried to my personal Gmail account. but I can not receive it. It is also not on spam box.

If you have trouble, please feel to let us know immediately rather than changing configuration as we can help with the diagnosis. For example, I’m about to PM you the email logs from the first few messages you apparently tried sending and they show they were indeed delivered to gmail. If you’re having deliverability problems beyond that we can help ensure SPF and DKIM are correctly setup.

---

_[View the full topic](https://meta.discourse.org/t/dkim-key-was-provided-incorrect/23931)._
