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

How do I set up cPanel/WHM to send messages via the outgoing filter?


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


Variant 1: Authentication via the IP address (all domains)

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

Navigate to the "Exim Configuration Editor" in WHM.

4

Select "Advanced Editor".

5

Add the following lines to Section: POSTMAILCOUNT

smarthost_dkim:
driver = manualroute
domains = !+local_domains
require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_dkim
route_list = $domain relay.europeanmx.eu::587
smarthost_regular:
driver = manualroute
domains = !+local_domains
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_regular
route_list = $domain relay.europeanmx.eu::587
6

Add the following lines to Section: TRANSPORTSTART

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
headers_add = "${perl{check_mail_permissions_headers}}"
remote_smtp_smart_regular:
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}}
headers_add = "${perl{check_mail_permissions_headers}}"
7

Save the changes and restart your server.


Variant 2: Authentication via the IP address (only certain domains)

This method allows you to route messages from certain domains on your mail server through our filtering cloud while they continue to authenticate themselves by IP address.

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

Access your cPanel/WHM servers via SSH.

4

Create the following file /etc/europeanmx_domains and enter all the domain names you want to send via EuropeanMX. Use one line per domain and save it.

5

Navigate to the "Exim Configuration Editor" in WHM.

6

Select "Advanced Editor".

7

Add the following lines to Section: POSTMAILCOUNT

smarthost_dkim:
driver = manualroute
domains = !+local_domains
condition = ${if match_domain{$sender_address_domain}{lsearch;/etc/europeanmx_domains}}
require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_dkim
route_list = $domain relay.europeanmx.eu::587
smarthost_regular:
driver = manualroute
domains = !+local_domains
condition = ${if match_domain{$sender_address_domain}{lsearch;/etc/europeanmx_domains}}
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_regular
route_list = $domain relay.europeanmx.eu::587
8

Add the following lines to Section: TRANSPORTSTART

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
headers_add = "${perl{check_mail_permissions_headers}}"
remote_smtp_smart_regular:
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}}
headers_add = "${perl{check_mail_permissions_headers}}"
9

Save the changes and restart your server.


Variant 3: 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

Navigate to the "Exim Configuration Editor" in WHM.

4

Select "Advanced Editor".

5

Add the following lines to Section: POSTMAILCOUNT

smarthost_dkim:
driver = manualroute
domains = !+local_domains
require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_dkim
route_list = $domain relay.europeanmx.eu::587
smarthost_regular:
driver = manualroute
domains = !+local_domains
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_regular
route_list = $domain relay.europeanmx.eu::587
6

Add the following lines to Section: TRANSPORTSTART

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
headers_add = "${perl{check_mail_permissions_headers}}"
hosts_require_auth = *
remote_smtp_smart_regular:
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}}
headers_add = "${perl{check_mail_permissions_headers}}"
hosts_require_auth = *
7

Add the following lines to Section: AUTH. Replace username@example.com with your address and yourUserPassword with the password you have set for the outgoing user in EuropeanMX.

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

Please make sure that you do not use special characters (like z.B. ä, ü, ö, á, é, etc.) in your password.

8

Save the changes and restart your server.

9

Please make sure that you have entered all EuropeanMX IP addresses in the whitelist. Alternatively, you can add the hostname "spf.europeanmx.eu" in the following place:

Exim Configuration Manager > Basic Editor > Access Lists > "Only-Verify-Recipient"

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