0

For my application, I need to create MX and SRV records. If I just include MX records in the install.json, it works. If I also add the SRV record I need, I gat an error with code 'dns' and message 'Error saving DNS'.

The following is the 'dns' section from my install.json, with the actual domain names changed:

"dns": [
      {
        "content": "mx.example.com.",
        "name": "_mx._tcp.example.name",
        "port": 25,
        "priority": 10,
        "type": "SRV",
        "weight": 10
      },
      {
        "content": "mx1.example.net",
        "name": "example.org",
        "priority": 1,
        "type": "MX"
      },
      {
        "content": "mx2.exmaple.net",
        "name": "example.org",
        "priority": 1,
        "type": "MX"
      }
    ],

Am I doint something wrong, or is this just impossible?

fiirhok
  • 386
  • 3
  • 10

1 Answers1

1

This should be possible. Instead, try:

{

  "type": "SRV",
  "name": "_sip._tcp.example2.com.",
  "content": "SRV 21 1 1 example2.com.",
  "meta": {},
  "data": {
    "priority": 21,
    "weight": 1,
    "port": 1,
    "target": "example2.com",
    "service": "_sip",
    "proto": "_tcp",
    "name": "example2.com"
  },
  "priority": 21
}

As this lines up with Cloudflare's API expected request body.

  • When I try that format, I get the same error. Is there anything else I can do troubleshoot? – fiirhok Jul 10 '18 at 00:02
  • 1
    What does the error say? Is there an output to console.log? If so could you share it? If no errors in console, could you share your entire install.json (omitting confidential parts)? – Victoria Bernard Jul 11 '18 at 18:00
  • There was a bug that has since been fixed. The format described here now works as expected. – fiirhok Nov 07 '18 at 20:35