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

fix SRV and MX records #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix SRV and MX records #8

wants to merge 2 commits into from

Conversation

Adphi
Copy link

@Adphi Adphi commented Oct 7, 2022

SRV records are now working using a canonical value e.g. "10 10 993 mail.example.org"
MX records are now also working using both canonical value e.g. "10 example.org" or by setting the Priority field and a simple value e.g. "example.org"
The search records now remove the zone from the name before setting it to the fqdn form

It also adds some basic tests (#3) for usual mail server records (A, MX, TXT, SRV) and CNAME.

Adphi added 2 commits October 7, 2022 11:23
SRV records are now working using a canonical name e.g. "10 10 993 mail.example.org"
MX records are now alose working using both canonical name e.g. "10 example.org" or by setting the Priority field et a simple value e.g. "example.org"
The search records now remove the zone from the name before setting it to the fqdn form

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
@mholt
Copy link
Contributor

mholt commented Oct 7, 2022

Thanks for the PR! I like where this is going.

As mentioned in my comment, maybe we should get rid of Priority and Weight and other specialized fields and have helpers instead (kind of like we do for SRV, but with the fixes obviously).

@Adphi
Copy link
Author

Adphi commented Oct 15, 2022

Sorry, I did not had enough time this week to come back to you.
I expect to find some time in the following ones to start working on the following points:

  • PR on the main repo to remove the record's extra fields
  • PR on the main repo to add methods for target conversion to individual record types (there is a high probability that this one will use the miekg implementation)
  • We need to settle the destination structs types from the previous point
  • update this PR to use theses methods
  • back to the main repo, write some minimal/draft conformance tests
  • implement them here as draft guidelines

@balki
Copy link

balki commented Apr 23, 2024

I needed to create MX record. Had to add the patch below:
https://gitea.balki.me/balki/cloudflare-dns-cli/commit/581d6613cc87b1c469f40c6456d83614f53c7b2e

@mholt
Copy link
Contributor

mholt commented Apr 23, 2024

@balki Thank you!

@Adphi Any chance you'd have interest/time to finish up this one?

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

Successfully merging this pull request may close these issues.

3 participants