What is a Smart Host?
A Smart Host is an SMTP relay server that accepts emails from another mail server and delivers them on its behalf.
For example, if server1 is configured to use server2 as a Smart Host, all outgoing emails from server1 will automatically be routed through server2, regardless of the recipient’s MX records.
Server2 then looks up the correct mail destination and delivers the email. This setup is commonly used for load balancing, email filtering, or overcoming IP blacklisting issues.
How to Configure a Smart Host in Exim
Step 1: Edit the Exim Configuration File
To configure a Smart Host, create or edit the file:
nano /etc/exim.conf.local
Add the following lines, replacing host.name.of.smart.host.server
with the actual hostname or IP address of your Smart Host:
@ROUTERSTART@ smart_route: driver = manualroute domains = !+local_domains transport = remote_smtp route_list = * host.name.of.smart.host.server
Step 2: Rebuild Exim Configuration
After saving the file, rebuild the Exim configuration to apply changes:
/scripts/buildeximconf
Step 3: Restart Exim
Restart the Exim service to enable the new routing settings:
/scripts/restartsrv_exim
How to Verify That Smart Host is Working
Monitor your mail logs to ensure emails are being relayed through the Smart Host:
tail -f /var/log/exim_mainlog
Look for lines indicating that emails are being routed to the designated Smart Host.
Why Use a Smart Host?
- Improves Email Deliverability: Avoids IP blacklisting issues by routing through a trusted mail server.
- Load Balancing: Distributes outgoing mail traffic across multiple servers.
- Centralized Email Filtering: Allows security filtering at a single SMTP relay before delivery.
Need Reliable Email Hosting? Choose UnderHost!
Looking for secure and high-performance email solutions? UnderMail provides advanced email hosting with spam filtering and Smart Host capabilities.
For expert support, visit UnderHost Customer Panel.