Instructions for updating the Exim configuration to use MailChannels as a relay host are provided in this article. Authentication with MailChannels is required and is relatively simple to setup.
Exim versions 4.5.7+
- Create the following files with the contents specified.
/etc/exim.routers.pre.conf
smart_route: |
/etc/exim.transports.pre.conf
auth_relay: |
/etc/exim.authenticators.post.conf
auth_login: |
* smtpusername : smtppassword should be replaced with the SMTP Username/Password you created when signing up with MailChannels.
- Restart exim when done.
Exim versions prior to 4.5.7
With DirectAdmin, the exim configurations are stored in the /etc/exim.conf file on your server and the following changes should be added/modified in the /etc/exim.conf file.
Setting Up Authentication
- Add the following entries under the "begin authenticators" section.
begin authenticators |
* smtpusername : smtppassword should be replaced with the SMTP Username/Password you created when signing up with MailChannels.
- Add the following Send via MailChannels route to the top of the "begin routers" section.
begin routers
send_via_mailchannels:
driver = manualroute
domains = ! +local_domains
senders = !*@domain1.to.exclude.com : !*@domain2.to.exclude.com
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
transport = auth_relay
route_list = * smtp.mailchannels.net
no_more
In the example above, if you do not wish to exclude a domain or sender from the MailChannels relay, leave the senders = line blank. If you do wish to exclude senders or domains here, replace the bracketed sample text with the actual sender address or domain name.
Example of default lookuphost: router section:
lookuphost:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
transport = remote_smtp
no_more
- Add the following transport to the "begin transports" section.
begin transports |
Add Authentication Header
An authenticated sender header is required to track sender reputation within the MailChannels system. This section provides instructions for adding the authenticated sender header to the outgoing emails.
The authenticated sender header can be added by editing /etc/exim.conf
- Add the complete "headers_add" line to the file just below “driver = smtp” line as shown:
driver = smtp headers_add = X-AuthUser: $authenticated_id |
Warning: Versions of Exim prior to the current major release are considered obsolete. If you are using Exim 3.x or earlier it is suggested by the Exim development team that you upgrade to the current release.
Comments
Article is closed for comments.