AnalogJ / lexicon

Manipulate DNS records on various DNS providers in a standardized way.
MIT License
1.48k stars 305 forks source link

Netcup Error - TXT and MX record #1103

Open mustermann2021 opened 2 years ago

mustermann2021 commented 2 years ago

I tried the pullrequest for "Netcup" and it works most of the way but it giving some errors at the end. The examples are these once:

ERROR - create für Eintrag MX/nitter.maindomain.tld fehlgeschlagen: MX record destination is incorrect. An example of a correct entry: mail.nitter. (4013)

ERROR - create für Eintrag TXT/_dmarc.nitter.maindomain.tld fehlgeschlagen: Please put quotation marks in front of a backspash. The name server automatically sets quotation marks at the beginning and end. (4013)

Can i somehow help so solve the problem? I use lexicon within yunohost and the full errorlog is here.

Thanks you a lot!

adferrand commented 2 years ago

From what I see in the logs, it seems that the MX records should be inserted with a trailing dot in the content, and the TXT record content should be enclosed with quotes.

It seems also that the values of the records are passed verbatim from the command line flag --content to Netcup API. Could you retry the calls with content of kind mail.domain.tld. for the MX records and '"My content"' for the TXT records ?

mustermann2021 commented 2 years ago

Hey there, thanks for the suggestion. ill try my best and test it. Hopefully this weekend.

alexAubin commented 2 years ago

Hey there,

I'm one of the Yunohost folks who worked on the integration of Lexicon

After chatting a bit with @mustermann2021, here are some additional info that may help:

So bottom line is : maybe sending mail.foobar.domain.tld. as name works for Netcup API ... but we know that sending foobar for OVH and Gandi does work, so why wouldn't it work for Netcut too :stuck_out_tongue:

alexAubin commented 2 years ago

(Aaaand after writing this I realize that I was focused on the name but not the value/content ... which our error message doesn't display ... though still, the current formatting of queries work for OVH/Gandi but not for some other APIs)

adferrand commented 2 years ago

Indeed, the problem here is for the value of the record, not its content. For the name, yes Lexicon is taking care of standardizing the inputs/outputs so that the commands are always the same. Basically it is always acceptable to put the relative name for a given domain.

But for content, there is no specific control, because it is really depends on each DNS API and even each kind of record.

mustermann2021 commented 2 years ago

@adferrand Thanks for the clarification. @alexAubin So there is nothing we can do right?