37.7. Configuring Domain Routing

Sendmail's domain routing feature can be used to forward all email to a particular domain to a different server. It is most useful if the DNS is set up to send email for some domain to your system, which should then be forwarded to another MTA that is unreachable by the rest of the Internet. Routing can also be used to override the normal method by which Sendmail works out which host to send email to, which can be handy on networks in which connectivity is incomplete or some DNS information is not available to all hosts.

To add a new domain routing rule, follow these steps:

1.
On the main page of the module, click on the Domain Routing icon. A page listing existing routings (if any) will be displayed, above which is a form for adding a new one.

2.
To have email to just a specific domain or host routed elsewhere, select the Host option in the Mail for field and enter the domain or hostname into the adjacent field.

Alternately, if you want email for all hosts within a domain to be routed, select Domain instead and enter the domain name into its field. A routing of this kind for the domain example.com will not affect email send to an address in the domain (like [email protected]), but only email to addresses on hosts under the domain (like [email protected]). Normally, this is not what you want.

Any domain or hostname that you enter must be on the list for which Sendmail allows relaying, as explained in Section 37.5 “Configuring Relaying”.

3.
From the Delivery menu, select SMTP. This field tells Sendmail which protocol to use when routing email for the domain. Most of the other options are useless, as they relate to UUCP, which is hardly used anymore.

4.
In the Send to field, enter the hostname of the system to which mail should be forwarded. The Ignore MX for SMTP delivery box should be checked as well, so that Sendmail always delivers directly to this host instead of trying another DNS look up to determine the correct destination.

5.
Hit the Create button to add and activate the new domain routing. You should test it to make sure it is really working, as small mistakes (such as selecting Domain instead of Host) can prevent a route from working.

As on other similar pages in the module, an existing routing rule can be edited or deleted by clicking on its domain name in the list on the Domain Routing page. There is no way to temporarily disable a rule, however, as there is with aliases.

Sendmail can also be configured to forward all non-local email to a specific server, rather than just email to particular domains. This is useful if your company or ISP has a central mail server to which you want to hand off email, rather than having your system connect to the real destination server. The next section explains how to set this up.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.212.211