Integrating MailChannels with your sPanel to manage outbound emails can significantly improve your email delivery rates and protect your sender reputation. Fortunately, setting this up is straightforward, and we've made it as simple as possible, following the easy configuration approaches used in Direct Admin and cPanel.
What You Need to Know:
MailChannels is a service that helps in ensuring your emails actually reach their destination by bypassing the issues often faced due to IP reputation and other email delivery challenges. Setting it up with sPanel's Exim email server involves making a few adjustments to Exim's configuration files. Here's how to do it in a way that's easy to update and manage:
-
Prepare Your Configuration Files:
The key to integrating MailChannels into your sPanel setup is to work with three primary configuration files, so that a update on the exim.conf doesnt get rid of all your hard work,
- Routers Configuration (exim.routers.pre.conf)
- Transports Configuration (exim.transports.pre.conf)
- Authenticators Configuration (exim.authenticators.post.conf)
-
Configuring the Smart Route:
In the routers configuration file, you'll set up a 'smart route' that directs emails not meant for local domains to MailChannels. This involves specifying which domains to ignore (like your own local domains) and setting up conditions for when to use MailChannels based on the sender's domain.
/etc/exim.routers.pre.conf
smart_route:driver = manualroutedomains = ! +local_domainsignore_target_hosts = 127.0.0.0/8#next line can me commented out with a # to use mailchannels for all domains.condition = "${if match_domain{$sender_address_domain}{lsearch;/etc/mailchannels_domains}}"#use auth_relay if you do need to set the remote smtpauthtransport = auth_relayroute_list = * smtp.mailchannels.net::587 randomize bynameno_more -
Setting Up Transport and Authentication:
The transport configuration involves adding a header for authentication and specifying that both authentication and TLS are required. Meanwhile, the authenticators configuration requires you to input your MailChannels SMTP user and password, ensuring secure transmission of your emails.
/etc/exim.transports.pre.conf
auth_relay:driver = smtpheaders_add = X-AuthUser: $authenticated_idhosts_require_auth = $host_addresshosts_require_tls = $host_addressexim.authenticators.post.conf
Obviously you have to change the USERID and PASSWORD below:auth_login:driver = plaintextpublic_name = LOGIN#specify your mailchannels SMTP user and password belowhide client_send = : USERID : PASSWORD -
Finalizing Your Setup:
After preparing your configuration files, you'll need to include them in your main
below this line and before any next line add:exim.conffile. This is done by adding include directives under the respective sections for routers, transports, and authenticators. This approach allows for easy management and updates to your configuration.
edit the /etc/exim/exim.conf file as follows:
search for: begin routers
.include_if_exists /etc/exim.routers.pre.conf
search for: begin transports
below this line and before any next line add:
.include_if_exists /etc/exim.transports.pre.conf
search for: begin authenticators
below this line and before any next line add:
.include_if_exists /etc/exim.authenticators.post.conf -
Creating a Domain List File:
Lastly, you'll create a file named
/etc/mailchannels_domainsto list the domains you want MailChannels to handle. This step is crucial for customizing which domains use MailChannels for email delivery.
Example of/etc/mailchannels_domainsdomain1.comdomain2.nldomain3.de
This documentation comes without any warranty and should be done by a system administrator knowing what they are doing. Need hosting with mailchannels enabled? contact 040Hosting support and we are glad to see what we can do for you.