How can I activate journaling in Exim (Linux)?


If you use EuropeanMX for both inbound and outbound email filtering (using the smarthost setup), all external SMTP communication is automatically archived as part of the domain for which archiving is enabled. However, Exim does not forward the internal communication via the outgoing smarthost, therefore the internal communication is not archived by default.

However, archiving internal communication via EuropeanMX is quite simple and can be activated in just a few steps. The journaling system allows Exim to automatically send a copy of all internal communication to an external e-mail address. As long as you have set up the external e-mail address with EuropeanMX for archiving, the EuropeanMX inbound filter will process the message and archive it. Configure the destination address to which the journaling reports are sent as a recipient in the approval list. This means that no filtering takes place for the received messages.


Find the global journal address

The global journal address can be found under Archiving > Status. Make sure that archiving is activated.


If the address ends with @MX-record-hostname, please use @mx1.europeanmx.eu instead.


Configuring journaling on Exim (Linux)

To enable journaling on Exim (Linux), the local_user router must be edited so that emails are redirected to a modified smarthost router.


The following configuration has been tested on Ubuntu 14.04.5 LTS, other distributions may use different file locations.

1

Edit the local_user router:

/etc/exim4/conf.d/router/900_exim4-config_local_user
2

Add a new router at the beginning of the file:

journal:
debug_print = "R: journaling for $local_part@$domain"
driver = redirect
domains = +local_domains
redirect_router = journal_send
data = [YOUR_GLOBAL_JOURNALADDRESS]
3

Add the following line to the local_user router:

local_user:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
domains = +local_domains
check_local_user
local_parts = ! root
transport = LOCAL_DELIVERY
cannot_route_message = Unknown user
4

Add the new router at the end of the file:

journal_send:
driver = manualroute
domains = +local_domains
transport = remote_smtp
route_list = * smtp.antispamcloud.com

Was this article helpful?

No Yes