3

I've been trying to set an openDKIM public key as a TXT record within the Route53 hosted zone for my domain.

The record is mail._domainkey .zewtie.io but, however I enter the public key in the Route53 TXT record, the DKIM public key never seems to be propagated in DNS.

I know of the 255 character limit on the DNS UDP packets, so I split the key into a single line of sub-255 character strings like this;

"v=DKIM1; h=sha256; k=rsa; s=email; "
"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0QIXEqgbl+f3r18UaNFKk/54f06UK7hTGdNsBU/"
"9EaWYqPltJaHwtGx0j/EEHIgdYVOZyTakX7ljMBF55W"
"g1QkLeR4uy0tfU9sWTWPjfpC4zGjGyDIM6f5Gwjk1iw"
"+0f3T9uftKUyyz76N5cndxNSt8m1RTkAw+54rQKWBecLwQIDAQAB"

This still doesn't seem to work however.

Would anyone know of the way to successfully propagate a DKIM public key from a Route53 hosted zone?

2
  • Having the double quotes tells Route 53 to create a new record. Try removing all the double quotes except from start and end.
    – imperalix
    Sep 18, 2015 at 5:15
  • 1
    Yes, I did try this originally but it didn't work as expected. Enclosed in only a pair of quotes at beginning and end the TXT record for the DKIM key was never propagated in DNS. I found this blog post which described my issue exactly; link Formatting the DKIM key in this way by breaking it up solved the issue, so I'm not all that concerned by the TXT record being broken up into separate packets. Sep 19, 2015 at 11:04

2 Answers 2

2

Spaces between the quotation marks were being interpreted as new-lines. Removing the spaces between the quotation marks fixed the issue.

2
  • 1
    In my experience, Route53 handles the character limit for you. We put our DKIM keys as a single record and it works just fine.
    – ceejayoz
    Sep 16, 2015 at 14:39
  • 1
    @ceejayoz, it does not May 3, 2016 at 15:15
2

I had a similar issue and I solved it was that in the following code block:

"v=DKIM1; h=sha256; k=rsa; s=email;"
"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0QIXEqgbl+f3r18UaNFKk/54f06UK7hTGdNsBU/"
"9EaWYqPltJaHwtGx0j/EEHIgdYVOZyTakX7ljMBF55W"
"g1QkLeR4uy0tfU9sWTWPjfpC4zGjGyDIM6f5Gwjk1iw"
"+0f3T9uftKUyyz76N5cndxNSt8m1RTkAw+54rQKWBecLwQIDAQAB"

Needs to be separated by a space and not be a new line character "\n" If you enter each string in a new line, then it doesn't work as expected. It should be:

"v=DKIM1; h=sha256; k=rsa; s=email;" "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0QIXEqgbl+f3r18UaNFKk/54f06UK7hTGdNsBU/" "9EaWYqPltJaHwtGx0j/EEHIgdYVOZyTakX7ljMBF55W" "g1QkLeR4uy0tfU9sWTWPjfpC4zGjGyDIM6f5Gwjk1iw" "+0f3T9uftKUyyz76N5cndxNSt8m1RTkAw+54rQKWBecLwQIDAQAB"
1
  • I tried to do the above, splitting my key in a text editor (gedit) and copy/pasting it into the Route53 TXT field. This seemed to result in Route53 handling the splitting space similar to a "\n" character. Deleting the space and re-entering it in the TXT field box in the AWS web console it's self solved the issue. (Possibly wouldn't have been an issue if I was using the AWS CLI.) Apr 30, 2019 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .