dnscontrol/docs/_functions/domain/MX.md
Julius Rickert 20dad35167
Replace Jekyll highlight tags with fenced code blocks (#1412)
* Replace Jekyll highlight tags with fenced code blocks

Replace Jekyll highlight tags with fenced code blocks.
Canonicalize javascript to js.
Correct highlighting languages.
Add highlighting to code blocks.
Remove leading $ from bash blocks.
Remove empty lines at start and end of code blocks.
Stripped trailing whitespace.

* Fix language of code highlighting
2022-02-17 12:22:31 -05:00

592 B

name parameters
MX
name
priority
target
modifiers...

MX adds an MX record to the domain.

Priority should be a number.

Target should be a string representing the MX target. If it is a single label we will assume it is a relative name on the current domain. If it contains any dots, it should be a fully qualified domain name, ending with a ..

{% include startExample.html %}

D("example.com", REGISTRAR, DnsProvider(R53),
  MX("@", 5, "mail"), // mx example.com -> mail.example.com
  MX("sub", 10, "mail.foo.com.")
);

{% include endExample.html %}