Introduction
If your server uses a smarthost for sending mail, and you want Exim to follow the maximum hourly email-sending limits, you must configure Exim as outlined here.
Procedure
In WHM, go to the Advanced Editor of the Exim Configuration Manager. For each of the sections below, enter the information below that section into the corresponding boxes in the configuration editor.
Section: POSTMAILCOUNT
The POSTMAILCOUNT section must be used instead of ROUTERSTART if you wish for max hourly mail limits to be followed and used. You must also add the domains = section
if you want the server to still accept mail for the local domains and only relay mail out; otherwise, all email--incoming and outgoing--gets relayed through the smarthost. Also, make sure to replace smtp.server.com
with your smarthost's hostname:
remoteserver_route:
driver = manualroute
transport = remoteserver_relay
domains = !+local_domains
route_list = * smtp.server.com
Section: TRANSPORTSTART
Make sure to update $host_address
with your smarthost's IP address:
remoteserver_relay:
driver = smtp
port = 587
hosts_require_auth = $host_address
hosts_require_tls = $host_address
Section: AUTH
Make sure to update this information with your smarthost's username and password:
remoteserver_login:
driver = plaintext
public_name = LOGIN
hide client_send = : user@domain.com : password
DKIM
If you wish to use DKIM, also add the following to each section:
Section: POSTMAILCOUNT
smarthost_dkim:
driver = manualroute
domains = !+local_domains
require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
transport = remote_smtp_smart_dkim
route_list = * smtp.domain.com
Section: TRANSPORTSTART
remote_smtp_smart_dkim:
driver = smtp
hosts_require_tls = *
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
dkim_domain = $sender_address_domain
dkim_selector = default
dkim_private_key = "/var/cpanel/domain_keys/private/${dkim_domain}"
dkim_canon = relaxed
Once you have finished adding the above information to all the appropriate sections, scroll to the bottom of the page and click Save. This automatically applies the settings and restarts Exim. Now any email sent out will be routed through the remote smarthost and will follow the max hourly mail limits.
Comments
0 comments
Article is closed for comments.