Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Add a mail exchanger (MX) resource record to a zone

Updated: May 9, 2008

Applies To: Windows Server 2008

You can use this procedure to add a mail exchanger (MX) resource record to a Domain Name System (DNS) zone to provide message routing to a mail exchanger host.

You can complete this procedure using either the DNS Manager snap-in or the dnscmd command-line tool.

Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (http://go.microsoft.com/fwlink/?LinkId=83477).

  1. Open DNS Manager. To open DNS Manager, click Start, point to Administrative Tools, and then click DNS.

  2. Open DNS Manager.

  3. In the console tree, right-click the forward lookup zone to which you want to add the record, and then click New Mail Exchanger (MX).

  4. In Host or child domain, type the domain name for which this record is to be used to deliver mail.

  5. In Fully qualified domain name (FQDN) of mail server, type the DNS host computer name of the mail exchanger or mail server host that delivers mail for the specified domain name. The exchanger host must have a corresponding host (A or AAAA) address resource record in a valid zone.

    As an option, you can click Browse to view the DNS namespace for mail exchanger hosts in this domain that have host (A or AAAA) records already defined.

  6. Type a new value in Mail server priority to adjust the server priority as needed for this zone. Lower numbers are given greater preference.

  7. Click OK to add the new record to the zone.

  1. Open a command prompt. To open an elevated Command Prompt window, click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  2. At the command prompt, type the following command, and then press ENTER:

    dnscmd <ServerName> /RecordAdd <ZoneName> <NodeName> [/Aging] [<Ttl>] MX <Preference> <MXServerName>
    

 

Parameter Description

dsncmd

Manages DNS servers.

<ServerName>

Required. Specifies the DNS host name of the DNS server. You can also type the IP address of the DNS server. To specify the DNS server on the local computer, you can also type a period (.).

/RecordAdd

Adds a new resource record.

<ZoneName>

Required. Specifies the fully qualified domain name (FQDN) of the zone in which you will add the new mail exchanger (MX) resource record.

<NodeName>

Required. Specifies the FQDN of the node in the DNS namespace. You can also type the node name relative to the <ZoneName> or @, which specifies the zone's root node.

/Aging

Specifies that this resource record is able to be aged and scavenged. If this command is used, this resource record is able to be aged and scavenged. If this command is not used, the resource record remains in the DNS database unless it is manually updated or removed.

<Ttl>

Specifies the Time To Live (TTL) setting for the resource record.

MX

Required. Specifies the mail exchanger (MX) resource record type for the record you are adding.

<Preference>

Required. Specifies a numeric value (between 0 and 65535) that indicates the mail exchange server's priority with respect to the other mail exchange servers. Lower numbers are given greater preference.

<MXServerName>

Required. Specifies the fully qualified domain name (FQDN) for a mail exchanger. The value entered here must resolve to a corresponding host (A or AAAA) resource record in a zone.

To view the complete syntax for this command, at a command prompt, type the following command, and then press ENTER:

dnscmd /RecordAdd /help 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.