To setup a remote smtp relay with authentication that will adhere to and follow your max hourly mail limits we will make a slight change to this process as in the previous forum article on creating an smtp relay with authentication.
First login to WHM and then proceed to the following location Home »Service Configuration »Exim Configuration Manager and click the Basic Editor tab.
From here search for Smarthost Support under the Mail tab. Enter your smart host as follows. Please note the space between the * (asterisk) and hostname. Then hit save.
Next go to the Advanced Editor Tab and look for each of the sections below and enter the information below that section into the corresponding boxes in the configuration editor. Make sure to update this information with your smtp server, username and password.
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 wish for the server to still accept mail for the localdomains and only relaying mail out. Otherwise all email, incoming and outgoing gets relayed.
Section: TRANSPORTSTART
Section: AUTH
If you wish to use DKIM from the Server add the following to each section as well.
Section: POSTMAILCOUNT
Section: TRANSPORTSTART
Once you have finished adding the above to all the appropriate sections, simply scroll to the bottom of the page and click save. It will automatically apply the settings and restart exim. Now anytime you send mail out it will be routed out through the remote smtp relay and will continue to follow your max hourly mail limits.
If you have any issues or questions with this feel free to open a ticket.
First login to WHM and then proceed to the following location Home »Service Configuration »Exim Configuration Manager and click the Basic Editor tab.
From here search for Smarthost Support under the Mail tab. Enter your smart host as follows. Please note the space between the * (asterisk) and hostname. Then hit save.
Code:
* my.smarthost.com
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 wish for the server to still accept mail for the localdomains and only relaying mail out. Otherwise all email, incoming and outgoing gets relayed.
Code:
remoteserver_route:
driver = manualroute
transport = remoteserver_relay
domains = !+local_domains
route_list = * smtp.server.com
Code:
remoteserver_relay:
driver = smtp
port = 587
hosts_require_auth = $host_address
hosts_require_tls = $host_address
Code:
remoteserver_login:
driver = plaintext
public_name = LOGIN
hide client_send = : [email protected] : password
Section: POSTMAILCOUNT
Code:
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
Code:
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
If you have any issues or questions with this feel free to open a ticket.
Last edited: