Introduction
When there is a requirement to send a single domain or a particular set of domains to a configured smarthost, a route list needs to be read from a file instead of using an asterisk as a wild card.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Create the file to contain the domains and the associated routes.
touch /etc/smartdomains.txt
- Change the group ownership of the file to the
mail
group.chgrp mail /etc/smartdomains.txt
- Set the file permissions to 640.
chmod 640 /etc/smartdomains.txt
- Open the file in your preferred text editor.
- Add each domain and the smarthost route to use for the domain to the file using the following format.
$domain.tld: $smart.host.tld::$port
Please note that "$domain.tld," "$smart.host.tld," and "$port" must be replaced with the domain name of the domain to use the smarthost, the smarthost's hostname, and the smarthost's port number, respectively. Additionally, each domain's entry must be on a separate line. - Save the changes and exit the text editor.
- Log into WHM as the ‘root’ user.
- Navigate to "Home / Service Configuration / Exim Configuration Manager."
- Click the "Advanced Editor" tab.
- Configure Exim to use the smarthost if one is not already configured. You will need to configure the smarthost manually using the Exim configuration options appropriate to your smart host. Your smart host provider can furnish you with the required directives and what sections in which to place them.
- Replace the route_list line with the following line.
route_data = ${lookup{$sender_address_domain}lsearch*{/etc/smartdomains.txt}}
Please note that "/etc/smartdomains.txt" must be replaced with the file created earlier if the file was created with a different name. - Remove the
no_more
line if present. - Scroll to the bottom of the page.
- Click the "Save" button.
Comments
0 comments
Article is closed for comments.