summaryrefslogtreecommitdiff
path: root/configs/system-integration/systemd/README.md
blob: 5ac8e0af7db5a5b4ff643d448314fb0a468760d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# System Unit Examples for Exim

This directory contains several examples for Systemd units to manage an Exim installation.
There is room for improvement, so please share your ideas or setups that are proven to work
in your environment.

All the service units try to protect the system from unintentional
writes to locations outside of Exim's spool, and log directories.  You
may need to override specific settings, we recommend using Systemd's
override mechanism.

## Daemon

This is best suited for *average to high traffic systems*, as it engages
all built-in Exim facilities, as queue runner management, and system load
depended message processing.

It starts the Exim main process. This process listens on the ports
configured in the _runtime configuration_, and supervises all other
activities, including management of queue runner startup (`exim -odf
-q...`).

For regular maintenance tasks (log rotation, database cleanup)
additional units are required.

## Socket

This is best suited for *low traffic* systems, which experience a
message *burst* from time to time. Regular desktop, and edge systems fit this
pattern.

Exim's start is delayed until the first connection. Once a connection is
initiated, Exim starts a listener on the port configured in the [systemd
socket unit](./socket/exim.socket) and waits for more connections, and exits after being idle
(`exim -bw...`).

Additional [_queue runner_ timer and service units](#queue-runner) are required.

For regular maintenance tasks (log rotation, database cleanup)
additional units are required.

## Inetd-like Socket

This is best suited for systems with *low traffic*, if the
[socket](#socket) approach doesn't work.

For each incoming connection a new Exim instance starts, handling
exactly this connection and then exits. The listener port is configured
in the [systemd socket unit](./inetd/exim.socket).

Additional [_queue runner_ timer and service units](#queue-runner) are required.

For regular maintenance tasks (log rotation, database cleanup)
additional units are required.

## Queue Runner

This is a *timer*, and a service unit which starts Exim queue runner
processes. This is necessary, as the socket activated Exim instances
(from [socket](#socket) and [inetd](#inetd-like-socket))
do not care once the first delivery attempt is done.

## Maintenance

This is a *timer* and triggers regular cleanup tasks.
For security it is recommended to use the `User=` Systemd directive in a
local override file.