X-AuthUser header for sender identification, and queue management settings.
Prerequisites
- Root-level access to your Linux server
- Your MailChannels SMTP username and password
- Exim 4.x or newer installed and running
/etc/exim.conf) or a split configuration under /etc/exim4/conf.d/ (common on Debian/Ubuntu). The snippets below apply to either format — place each block in the corresponding section of your configuration.
Core configuration
Authentication
Add the following block to thebegin authenticators section of your Exim configuration. This tells Exim how to log in to smtp.mailchannels.net using your credentials.
Authenticators section
MailChannelsUsername and MailChannelsPassword with your actual MailChannels SMTP credentials.
For systems that store credentials in a separate file (such as /etc/exim4/passwd.client on Debian-based systems), add the following line to that file and restrict its permissions.
/etc/exim4/passwd.client
Router
Add the following block to the routers section. Place it early in the router list so it intercepts outgoing mail before other rules. It routes all non-local mail tosmtp.mailchannels.net.
Routers section
If you are on a cPanel server and applying these settings manually, place the router block in Section: POSTMAILCOUNT in WHM’s Exim Advanced Editor. This ensures cPanel’s hourly email limits are enforced before mail is handed off to MailChannels.
Transport
Add the following block to the transports section. It defines how Exim connects to MailChannels, including TLS requirements, authentication, theX-AuthUser sender identification header, and DKIM signing.
Transports section
The
X-AuthUser header value is derived from $authenticated_id, which Exim populates with the email address or username of the authenticated sender. MailChannels uses this value to attribute messages to individual users for reputation and abuse tracking. The third field of the senderID (sid=) in the MailChannels console reflects this value.Reload Exim
After editing the configuration, restart Exim for changes to take effect.- Debian/Ubuntu (split config)
- CentOS/RHEL/AlmaLinux (monolithic)
- cPanel servers
Exclude domains from MailChannels routing
You can exclude specific sender or recipient domains so their mail bypasses MailChannels and is delivered directly. The method depends on your Exim version.Exclude recipient domains (file-based)
Create the exclusion file
Create
/etc/excludereceiverdomains and list each domain to exclude, one per line with a trailing colon./etc/excludereceiverdomains
Declare the domain list
Add the following line to Section: CONFIG (or the
main section of your exim.conf):Section: CONFIG
Reference the list in the router
Update the
domains line in your send_via_mailchannels router to reference the exclusion list:Updated router — recipient domain exclusion
Exclude sender domains (file-based)
Create the exclusion file
Create
/etc/excludesenderdomains and list each domain to exclude, one per line without a trailing colon./etc/excludesenderdomains
Declare the domain list
Add the following line to Section: CONFIG (or the
main section of your exim.conf):Section: CONFIG
Reference the list in the router
Add a
senders line to your send_via_mailchannels router:Updated router — sender domain exclusion
On Exim 4.89, the file-based
lsearch method for sender domain exclusion may not work as expected. Use the inline syntax instead:Exim 4.89 inline sender exclusion
Exclude mailer-daemon bounces
To preventmailer-daemon bounce messages from being relayed through MailChannels, add the following senders condition to your router:
Exclude mailer-daemon bounces
Inline domain-specific routing (without files)
For a small number of domains, you can specify inclusions and exclusions directly in the router without creating external files.Route only specific sender domains
Exclude specific sender domains inline
Exclude specific recipient domains inline
Rate-limit individual users
Limiting how many messages an authenticated user can send per hour is one of the most effective ways to contain the damage when an account is compromised. Add the following condition to your Exim ACL (access control list) for SMTP DATA or RCPT:Rate limit per authenticated sender
Queue management
These settings control how Exim handles the mail queue and retries. They typically belong in themain section and the begin retry section of your configuration.
Retry intervals
Add or update the following in thebegin retry section. These values are recommended by MailChannels to balance timely retries with queue health.
Retry section
relay timeout not reached for host errors caused by Exim caching a stale MailChannels IP, run the following commands to clear the retry and wait databases immediately:
Queue runner frequency
Forsystemd-based systems, create a service override to run the queue every 60 seconds:
systemd service override
init.d systems, edit /etc/default/exim (Debian/Ubuntu) or /etc/sysconfig/exim (CentOS/RHEL/CloudLinux):
Queue runner limits and frozen messages
Add or modify these in themain section of exim.conf:
Main section — queue settings
Verify the setup
After restarting Exim, confirm that mail is routing correctly.-
Monitor the mail log. Tail the main log and look for entries showing
R=send_via_mailchannelsandT=mailchannels_smtpwith a destination ofsmtp.mailchannels.net. - Send test emails. Send from several local accounts to external recipients and verify successful delivery.
-
Check received headers. Examine the headers of delivered messages to confirm
smtp.mailchannels.netappears in theReceived:chain and that theX-AuthUserheader is present with the correct value. - Review the MailChannels console. Log in to your MailChannels Host Console to confirm that messages from your server appear in Activity > LogSearch and that sender attribution is correct.

