Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to insert long DKIM keys with resource_record? #139

Open
WetHippie opened this issue Apr 4, 2018 · 0 comments
Open

How to insert long DKIM keys with resource_record? #139

WetHippie opened this issue Apr 4, 2018 · 0 comments

Comments

@WetHippie
Copy link

I'm trying to insert some 2048 byte DKIM keys into DNS using the resource_record script. Since nsupdate is not keen on having lines that long, I need to build it as a multiline input. I've tried both using the data field as an array and forcing in my own newline characters, but neither seems to work and generates the long line

Error: /Stage[main]/Mail_server::Relay/Dns::Hosted::Mailsec[choicetransformer.com]/Resource_record[smtp-choicetransformer.com-DKIM-record]: Could not evaluate: Execution of '/bin/nsupdate -y hmac-sha256:local-update:js/2XlzFVnv6N+pYbscACcHieMMUfm9bXsXF2rx+O53MIsUm8VhxNQfu Um+fu3VuYc/QDya71bd/ur3Xw+l6cA== /tmp/dns_rr-nsupdate-20180404-13563-tq504h' returned 1: 04-Apr-2018 12:39:36.664 dns_rdata_fromtext: buffer-0x7f6f5c169490:1: near '"v=DKIM1;': syntax error invalid rdata format: syntax error syntax error

And the RR file is:

server ns1.infrastructure.choice zone powerup.community update add smtp._domainkey.powerup.community. 180000 IN TXT "v=DKIM1; k=rsa; p=AAAAB3NzaC1yc2EAAAADAQABAAABAQDca2MXUUOn8A4QtFrS6+aRAUK4a4TLTm yDc6EMWN7nJhq8Kyoav9g5ICGrVqi4EzRqook21CQCMWHrSNILl9N+movXj9tD1g+Gii 7J7lqe5DLae2+CeigEuQ\no2Z9cAbvoKQagM5fHkyXB0l1FELi/BMjiZxopIwPSpkvhGNxQpyVz69kU1kGbWyyXcHd5GS0Wvpi8f4RhlMSUfp7hlgS\nnqYXI43btYZk0GPjd1HhDhEqWAPj5OtoWaeAE5zj1EUQjKbMSsjV/tT4a9vZ2zOhQe1+zZkL8WON4TRjRI9Usqdvo1KpOdeE3kAnD/SLK9yDzzkjeBQGCCIVn23CZVZxo7"

Note the \n char from puppet's insert results in literal \n appearing in the output stream, rather than turning it into a newline in the temp file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant