2017-04-11 23:02:57 -06:00
---
name: MX
parameters:
- name
- priority
- target
- modifiers...
2023-01-12 16:59:42 -05:00
parameter_types:
name: string
priority: number
target: string
"modifiers...": RecordModifier[]
2017-04-11 23:02:57 -06:00
---
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 `.` .
2022-03-04 13:49:03 +01:00
{% capture example %}
2022-02-17 18:22:31 +01:00
```js
2017-04-11 23:02:57 -06:00
D("example.com", REGISTRAR, DnsProvider(R53),
MX("@", 5, "mail"), // mx example.com -> mail.example.com
MX("sub", 10, "mail.foo.com.")
);
2022-02-17 18:22:31 +01:00
```
2022-03-04 13:49:03 +01:00
{% endcapture %}
2017-04-11 23:02:57 -06:00
2022-03-04 13:49:03 +01:00
{% include example.html content=example %}