Skip to content

Latest commit

 

History

History
148 lines (115 loc) · 3.37 KB

File metadata and controls

148 lines (115 loc) · 3.37 KB

DSC Resource 'DnsServerMxRecords'

DnsServerMxRecords manages MX (mail exchanger) DNS records on a DNS server.

When to use 'DnsServerMxRecords'

Use this resource when you need to create DNS MX records that define which mail servers handle email for your domain. MX records are essential for email routing and are required for any domain that receives email.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'DnsServerMxRecords'
Parameter Attribute DataType Description Allowed Values

Records

Hashtable[]

List of Mx DNS records

Table 2. Attributes of category 'DnsServerMxRecords/Records'
Parameter Attribute DataType Description Allowed Values

ZoneName

Key

String

Specifies the name of a DNS zone.

EmailDomain

Key

String

Everything after the '@' in the email addresses supported by this mail exchanger.

It must be a subdomain the zone or the zone itself. To specify all subdomains, use the '*' character (i.e.: *.contoso.com).

MailExchange

Key

String

FQDN of the server handling email for the specified email domain.

When setting the value, this FQDN must resolve to an IP address and cannot reference a CNAME record.

Priority

Mandatory

UInt16

Specifies the priority for this MX record among other MX records that belong to the same email domain, where a lower value has a higher priority.

TimeToLive

String

Specifies the TimeToLive value of the SRV record.

Value must be in valid TimeSpan string format (i.e.: Days.Hours:Minutes:Seconds.Miliseconds or 30.23:59:59.999).

Ensure

String

Whether the host record should be present or removed

  • Present (default)

  • Absent

Example
DnsServerMxRecords:
  Records:
    - ZoneName:     contoso.com
      EmailDomain:  contoso.com
      MailExchange: mailserver1.contoso.com
      Priority:     10

    - ZoneName:     contoso2.com'
      EmailDomain:  contoso2.com
      MailExchange: mailserver1.contoso2.com
      Priority:     20
      TimeToLive:   01:00:00
      Ensure:       Present
Recommended Lookup Options in Datum.yml (Excerpt)
default_lookup_options: MostSpecific

lookup_options:

  DnsServerMxRecords:
    merge_hash: deep
  DnsServerMxRecords\Records:
    merge_hash_array: UniqueKeyValTuples
    merge_options:
      tuple_keys:
        - ZoneName
        - EmailDomain
        - MailExchange