I l@ve RuBoard Previous Section Next Section

4.5 Configuring DNS for "Virtual" Email Addresses

4.5.1 Problem

You want to add a new "virtual" mail destination to DNS.

4.5.2 Solution

Add an MX record to the appropriate zone with the domain name of the mail destination as the owner name and the domain name of the mail server for that destination on the right side. For example, to route mail addressed to user@bar.example to mail.foo.example, you could add this MX record to the bar.example zone:

bar.example.    IN    MX    10 mail.foo.example.

4.5.3 Discussion

There's really nothing virtual about the mail destination bar.example from a DNS perspective -- hence the quotation marks. bar.example is a legitimate domain name in a real zone that happens to own an MX record, so it's usable as a mail destination.

Note that the MX record must be added to the correct zone. If you want to direct mail addressed to bar.example to a particular mail server, you must add the MX record to the bar.example zone data file. It won't do anyone any good in the foo.example zone data file: it'll be ignored as out-of-zone data.

mail.foo.example will probably need to be configured to understand that bar.example is a local mail destination. Then it's up to the mail server on mail.foo.example to decide what to do with mail addressed to individual users at bar.example. This might be handled by an aliases file or a virtual user table.

4.5.4 See Also

Section 2.5.

    I l@ve RuBoard Previous Section Next Section