You see an automatic translation. Please switch to our English original page in case of comprehension problems.

How do I set up Exim (DirectAdmin) to send messages through the outbound filter?


In this article we describe how you can set up the outgoing filter on your Exim (DirectAdmin) server in a few steps. In Exim(DirectAdmin) you can use different types of authentication. Depending on which variant you choose, a different procedure is necessary. 

Variant 1: Authentication via IP address

With this method, you route all messages from your mail server through our filter cloud.

1

Make sure that the IP address of your mail server has been created as outgoing user in EuropeanMX. For instructions on how to set up an outgoing user, please refer to our FAQ article "How do I set up an outgoing user?".

2

Make sure that the correct limits are set for the outgoing user in EuropeanMX. 

3

Add the following lines to /etc/exim.conf directly after the router section (after begin routers):

europeanmx_smarthost_router:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
headers_add = ${if !eq{$original_domain}{$domain}{X-Forwarded-For: $original_local_part@$original_domain}}
headers_add = X-AuthUser: $authenticated_id
transport = europeanmx_smarthost_transport
route_list = $domain relay.europeanmx.eu::587
no_more
4

Depending on the configuration, you may need to comment the lookuphost: router.

5

Add the following lines to /etc/exim.conf directly after the transport section (after begin transports):

europeanmx_smarthost_transport:
driver = smtp
# In-case your server continues to send outgoing over port 25 please add the below line
port = 587
hosts_require_tls = relay.europeanmx.eu
6

Restart your server.

7

If you sign with DKIM on your Exim (DirectAdmin) server, you may have to add the following line under hosts_require_tls.

.include_if_exists /etc/exim.dkim.conf


Variant 2: Authentication via a user name and password

With this method, you route all messages from your mail server through our filter cloud.

1

Make sure that an authenticating user has been created as outgoing user in EuropeanMX. For instructions on how to set up an outgoing user, please refer to our FAQ article "How do I set up an outgoing user?".

2

Make sure that the correct limits are set for the outgoing user in EuropeanMX. 

3

Add the following lines to /etc/exim.conf directly after the router section (after begin routers):

europeanmx_smarthost_router:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
headers_add = ${if !eq{$original_domain}{$domain}{X-Forwarded-For: $original_local_part@$original_domain}}\n\
X-AuthUser: $authenticated_id
headers_add = X-AuthUser: $authenticated_id
transport = europeanmx_smarthost_transport
route_list = $domain relay.europeanmx.eu::587
no_more
4

Depending on the configuration, you may need to comment the lookuphost: router.

europeanmx_smarthost_transport:
driver = smtp
# In-case your server continues to send outgoing over port 25 please add the below line
port = 587
hosts_require_tls = relay.europeanmx.eu
hosts_require_auth = *
5

Add the following lines in the begin authenticators section:

europeanmx_login:
driver = plaintext
public_name = LOGIN
client_send = : username@example.com : yourUserPassword

Replace username@example.com with the username and yourUserPassword with the password you created for the outgoing user in EuropeanMX

6

Restart Exim(DirectAdmin).

7

If you sign with DKIM on your Exim (DirectAdmin) server, you may have to add the following line under hosts_require_tls.

.include_if_exists /etc/exim.dkim.conf

Was this article helpful?
No Yes
We use cookies for the technical functionality of this website. With your consent, we also collect page views and other statistical data in anonymized form.

Select individually
Cookie Settings
Read Privacy Statement