38.7. Configuring Domain Routing

Normally, Qmail delivers email for nonlocal domains by looking up the appropriate mail server in the DNS and connecting to it. You can use this module to configure the MTA for connecting to a different server for certain domains instead, or to send all outgoing mail via a single server. This can be useful if your system is a gateway for several internal mail servers that cannot be reached directly from the rest of the Internet, or if you want all outgoing email to be sent via your ISP or company's server.

To specify an alternate mail server for a domain, follow these steps:

1.
On the module's main page, click on the Domain Routing icon to go to a page containing a list of all existing routings (if there are any) with a form at the top for adding a new one.

2.
In the Send via SMTP server field, select the second radio button and enter a hostname or IP address into the field next to it. If the Delivery directly option is chosen, Qmail will perform a DNS lookup for the domain and deliver mail to the resulting server manually, even if it has been configured to send all outgoing mail via another server. In the Create Domain Route form, enter the domain name that you want routed via a different server into the Mail for host or domain field.

3.
The SMTP port field should normally be left set to Default. If you choose the second option, however, Qmail will connect to the port number entered into its text field instead of the SMTP default of 25. This can be useful if, for some reason, a particular mail server is not using the normal port.

4.
Click the Create button to save and activate the new domain routing rule.

Once a routing has been added, it will appear below the creation form on the Domain Routing page. You can edit or delete it by clicking on the domain name, changing the details, and hitting the Save or Delete button, respectively. Once again, any changes will be immediately made active.

To tell Qmail to send all outgoing email via a specified mail server, do the following:

1.
Click on the Domain Routing icon on the main page.

2.
Scroll down to the Deliver all other outgoing mail via field and select the second radio button. Then enter the hostname or address of the server into the text box next to it.

3.
Click Save to activate the new setting.

To have Qmail look up and deliver normally to destination servers again, select Deliver directly in Step 2 instead.

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

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