Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mail:cpanel-smart-host [2011-04-09 00:10:30] garrett.plasky Approved |
mail:cpanel-smart-host [2015-10-26 16:27:40] rory.blanchard [Install Exim] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Configure Exim to use a Smart Host ====== | + | ====== Configure Exim to use a Smart Host on CentOS |
- | A Smart Host is an SMTP server that will accept mail from another server and then deliver the mail for that server. For example, server1 is setup to use server2 as a smart host. Anytime someone sends e-mail on server1 it is automatically relayed to server2 regardless of the MX entries for the domain. Server2 then accepts this message, looks up the proper delivery host/IP and attempts to deliver the message to that host. While the // | + | |
- | ==== Original | + | A Smart Host is an SMTP server that will accept mail from another server and then deliver the mail for that server. For example, server1 is setup to use server2 as a smart host. Anytime someone sends e-mail on server1 it is automatically relayed to the Smarthost regardless of the MX entries for the domain. Server2 then accepts this message, looks up the proper delivery host/IP and attempts to deliver the message to that host. While the // |
+ | \\ | ||
+ | \\ | ||
+ | ===== Install Exim ===== | ||
+ | |||
+ | To install Exim, you will need to first enable the EPEL repository. **SSH** to your server and run the following commands: | ||
+ | |||
+ | < | ||
+ | yum -y install epel-release | ||
+ | </ | ||
+ | |||
+ | Once that has been completed, run the following commands to install Exim. | ||
+ | |||
+ | < | ||
+ | yum -y install exim | ||
+ | </ | ||
+ | ===== Source | ||
To configure a smart host, create /// | To configure a smart host, create /// | ||
- | <sxh plain> | + | <code> |
smart_route: | smart_route: | ||
driver = manualroute | driver = manualroute | ||
domains = !+local_domains | domains = !+local_domains | ||
transport = remote_smtp | transport = remote_smtp | ||
- | route_list = * host.name.of.smart.host.server</ | + | route_list = * host.name.of.smart.host.server |
+ | </code> | ||
Assuming this server (server1) is a cPanel server, next run < | Assuming this server (server1) is a cPanel server, next run < | ||
+ | \\ | ||
+ | \\ | ||
+ | ===== Source Mailserver Config (with cPanel) ===== | ||
- | ==== Smarthost Server Config ==== | + | Log into **WHM**. |
- | Assuming you're installing the yum version of Exim on a CentOS/RHEL server, you'll need to make two configuration changes. The first is to allow the IP of the mailserver to relay through the smarthost. Open the configuration at /// | + | |
- | <q> | + | Go into **Mail**, **Exim Configuration**, |
+ | |||
+ | In the text box put in the following, replacing **X.X.X.X** with the IP address or the hostname of the SmartHost server: | ||
+ | |||
+ | < | ||
+ | * X.X.X.X | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | ===== Smarthost Server Config ===== | ||
+ | Assuming you're installing the yum version of Exim on a CentOS/RHEL server, you'll need to make two configuration changes. The first is to allow the IP of the mailserver to relay through the smarthost. Open the configuration at /// | ||
+ | |||
+ | <code> | ||
+ | hostlist | ||
+ | </code> | ||
Second, you'll need to tell Exim not to listen only on the localhost address for incoming mail, which is the default. Again find the configuration line below and add a hash (**#**) in front of it to comment it out. | Second, you'll need to tell Exim not to listen only on the localhost address for incoming mail, which is the default. Again find the configuration line below and add a hash (**#**) in front of it to comment it out. | ||
- | <q> | + | <code> |
Save the modified config file and restart Exim on this server. | Save the modified config file and restart Exim on this server. | ||
That's it; watch the logs for a bit to make sure it's working! The easiest way is to just < | That's it; watch the logs for a bit to make sure it's working! The easiest way is to just < | ||
+ | \\ | ||
+ | \\ | ||
{{tag> | {{tag> |