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

Chunk long TXT records when using ZoneFileProvider #65

Open
dagmartin opened this issue Jul 16, 2024 · 1 comment
Open

Chunk long TXT records when using ZoneFileProvider #65

dagmartin opened this issue Jul 16, 2024 · 1 comment

Comments

@dagmartin
Copy link

dagmartin commented Jul 16, 2024

When generating a zone with long TXT records (for example DKIM records with 2048 bit keys), the TXT record becomes to long and named-checkzone fails to validate the zone.
It seems that adding the following line to the ZoneFileProvider class splits up the record nicely:

if record._type in ('SPF', 'TXT'):
    # TXT values need to be quoted
    value = value.replace('"', '\\"')
    value = record.chunked_value(value)   <--- This line
    value = f'"{value}"'

I could make this into a pull request if needed.

@ross
Copy link
Contributor

ross commented Jul 16, 2024

I think I ran into this when working on octodns/octodns#1172 and addressed it there, but since that didn't ship, for now, it probably makes sense to get this sorted standalone. Will queue it up to look into.

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

2 participants