With the rapid deployment of Exchange Server in environments with UNIX-based mail servers, email administrators need to know how to map domains and naming conventions under UNIX-based mail servers to the Exchange environment. To successfully incorporate an Exchange environment into an existing UNIX mail environment, you must understand how to configure DNS to route messages from a UNIX relay host to Exchange and how UNIX mail servers process incoming mail.

DNS Overview
DNS resource records are the roadmap for most TCP/IP network services. For email routing, SMTP mail servers use the DNS mail exchanger (MX) resource record to determine where to route messages. You can configure Exchange and UNIX mail servers' DNS MX records to properly route mail messages. Internet mail also uses DNS MX records.

DNS configuration assigns MX records a preference number to prioritize the delivery location. The lower the MX record number, the higher the priority of the assigned delivery location. In the example DNS configuration file in Figure 1, the mail server delivers all mail destined for user@company.com first to unix.company.com and then to unix2.company.com if unix.company.com is unavailable.

Interoperability
Almost all large organizations separate their DNS domains into zones or subdomains. Furthermore, with the advent of firewalls, organizations often have separate public (external) and internal DNS zone records for enhanced security. Separating DNS configuration files into separate zone files is also a good way to organize maintenance and administrative responsibilities. For example, an organization with the domain name company .com can have several subdomains (e.g., engineering.company.com, asia .company.com, europe.company.com). You set up DNS subdomains by creating DNS resource records within configuration files and configuring the associated name servers for each domain, as Figure 2 shows.

Applying DNS subdomains is one way to implement interoperability between UNIX and Exchange mail servers. In this type of configuration, you send all Exchange users' mail to user@exchange.company.com and UNIX users' mail to user@unix.company.com, as you see in Figure 3.

This solution can create many configuration and end-user problems. One significant problem is that people outside the organization can't address all users within the organization at user@company.com because you've implemented separate subdomains for Exchange and UNIX users. This solution essentially tells the UNIX and Exchange servers to ignore one another, as Figure 4 shows. If you want to let outside users send mail to all users as users@company.com, you must configure the UNIX and Exchange servers to interoperate.

UNIX Mail Relay Hosts
When you introduce an Exchange server into a UNIX organization, you want the mail servers to create the appearance that all mail to users in the organization goes simply to user@company.com. To achieve this effect, you must properly configure the DNS and the UNIX relay host.

When viewed from the Internet, the company's public DNS MX record appears as

company.com IN MX 10 unix
.company.com

So, networks using DNS deliver mail destined for user@company.com to unix.company.com. Figure 5, page 12, shows how you can configure DNS and UNIX relay hosts so that you can add an Exchange server.

By looking at company.com's DNS MX record, you know that mail for company.com goes to unix.company.com first because unix.company.com has the lowest and only MX preference number assigned to the company.com domain. As Figure 5 shows, the UNIX mail server transfers mail to exchange.company.com. The configuration of DNS, unix.company.com, and exchange.company.com determines how the transfer occurs.

Relay Host Configuration
An external user sends a message to user@company.com. The server queries DNS and sends the message to the lowest preference MX record (i.e., unix.company.com). When the UNIX mail server application (e.g., Sendmail, Exim) receives mail, it uses a file called aliases to determine where to route the mail. If an Exchange-based user has the appropriate configuration within the aliases file, the UNIX mail server forwards the message to the Exchange server. Figure 6 shows an example aliases file.

When external users send mail to the organization's UNIX relay host, the mail application depends on the aliases file to determine how to process the mail. In this example, the UNIX mail server processes locally all mail destined for al@company.com and forwards bob and cathy mail to exchange.company.com. The UNIX server rewrites the mail header from bob@company.com to bob@exchange.company.com.

For internal users, a more efficient approach is to bypass the organization's primary UNIX relay host and use internal DNS MX records to route mail. Because most companies use firewalls, internal DNS records are usually different from outside records. To use DNS to route mail internally, design your DNS configuration files to look like those in Figure 7.

As you can see, if you configure internal users with their real mail address (i.e., bob@exchange.company.com), the server uses DNS to route mail. This configuration provides more effective routing internally and lessens the processing burden on the UNIX relay host.

After the UNIX relay host has processed mail from external users or DNS MX records have processed mail from internal users, mail goes to the Exchange server. Install the Internet Mail Service (IMS) on the Exchange server, and configure the IMS to receive mail destined for exchange .company.com. Go to the Internet Mail Service Properties sheet's Routing tab, and select Edit Routing Table Entry, as you see in Screen 1.

With the entry of Exchange into UNIX-based mail environments, email administrators can configure Exchange and UNIX to ignore each other or to interoperate. If you choose interoperability, use these tips for using DNS and a UNIX relay host.