1CYRUS.CONF(5) Cyrus IMAP CYRUS.CONF(5)
2
3
4
6 cyrus.conf - Cyrus IMAP documentation
7
8 Cyrus configuration file
9
11 cyrus.conf is the configuration file for the Cyrus master(8) process.
12 It defines the startup procedures, services, events and daemons to be
13 spawned, managed and tended to by master.
14
15 The /etc/cyrus.conf file consists of a series of entries divided into
16 sections of the form
17
18 section {
19 name arguments
20 ...
21 ...
22 ...
23 }
24
25 where section is the name of the section, name is the name of the entry
26 and arguments is the whitespace-separated list of arguments for the
27 entry. The name may be any sequence of alphabetic and numeric charac‐
28 ters, but may not contain punctuation such as '-' or '_'. In the SER‐
29 VICES section, names must be unique.
30
31 Blank lines and lines beginning with ``#'' are ignored.
32
34 The paragraphs below detail the four sections (START, SERVICES, EVENTS,
35 DAEMON) that can be placed in the /etc/cyrus.conf file. The arguments
36 that are available for each entry within the section are described, and
37 each argument's default value is shown.
38
39 An important distinction exists between SERVICES and DAEMON ; the for‐
40 mer have sockets which master(8) will listen on (either IP or Unix
41 domain) while the latter do not. Similarly, processes listed in START
42 will be run to completion before any SERVICES are started, while those
43 in DAEMON will be managed by master(8).
44
45 NOTE:
46 If master(8) is started in debugging mode (-D) the behavior of DAE‐
47 MON will be altered, as master(8) will no longer be backgrounded.
48 Thus, processes started under DAEMON may not be terminated by mas‐
49 ter(8).
50
51 Arguments can appear in any order. Some arguments have no default
52 value, these are listed with ``<no default>''. For string arguments,
53 the value MUST be enclosed in double quotes.
54
55 START
56 This section lists the processes to run before any SERVICES are
57 spawned. This section is typically used to initialize databases. Mas‐
58 ter itself will not startup until all tasks in START have completed, so
59 put no blocking commands here.
60
61 cmd=<no default>
62 The command (with options) to spawn as a child process. This string
63 argument is required.
64
65 NOTE:
66 Prior to v3, non-service daemons like idled were started from START
67 but would background themselves, thus not blocking. Post v3 these
68 are better managed through the DAEMON section, under which master
69 will provide life-cycle management (i.e. restarting dead processes).
70
71 SERVICES
72 This section is the heart of the /etc/cyrus.conf file. It lists the
73 processes that should be spawned to handle client connections made on
74 certain Internet/UNIX sockets.
75
76 babysit=0
77 Integer value - if non-zero, will make sure at least one process is
78 pre-forked, and will set the maxforkrate to 10 if it's zero.
79
80 cmd=<no default>
81 The command (with options) to spawn as a child process. This string
82 argument is required.
83
84 listen=<no default>
85 The UNIX or internet socket to listen on. This string field is
86 required and takes one of the following forms:
87
88 path
89 [ host : ] port
90
91 where path is the explicit path to a UNIX socket, host is either the
92 hostname or bracket-enclosed IP address of a network interface, and
93 port is either a port number or service name (as listed in /etc/ser‐
94 vices).
95
96 If host is missing, 0.0.0.0 (all interfaces) is assumed. Use local‐
97 host or 127.0.0.1 to restict access, i.e. when a proxy on the same
98 host is front-ending Cyrus.
99
100 Note that on most systems UNIX socket paths are limited to around
101 100 characters. See your system documentation for specifics.
102
103 proto=tcp
104 The protocol used for this service (tcp, tcp4, tcp6, udp, udp4,
105 udp6). This string argument is optional.
106
107 tcp4, udp4: These arguments are used to bind the service to IPv4
108 only.
109
110 tcp6, udp6: These arguments are used to bind the service to IPv6
111 only, if the operating system supports this.
112
113 tcp, udp: These arguments are used to bind to both IPv4 and IPv6 if
114 possible.
115
116 prefork=0
117 The number of instances of this service to always have running and
118 waiting for a connection (for faster initial response time). This
119 integer value is optional. Note that if you are listening on multi‐
120 ple network types (i.e. ipv4 and ipv6) then one process will be
121 forked for each address, causing twice as many processes as you
122 might expect.
123
124 maxchild=-1
125 The maximum number of instances of this service to spawn. A value
126 of -1 means unlimited. This integer value is optional.
127
128 maxfds=256
129 The maximum number of file descriptors to which to limit this
130 process. This integer value is optional.
131
132 maxforkrate=0
133 Maximum number of processes to fork per second - the master will
134 insert sleeps to ensure it doesn't fork faster than this on average.
135
136 EVENTS
137 This section lists processes that should be run at specific intervals,
138 similar to cron jobs. This section is typically used to perform sched‐
139 uled cleanup/maintenance.
140
141 cmd=<no default>
142 The command (with options) to spawn as a child process. This string
143 argument is required.
144
145 period=0
146 The interval (in minutes) at which to run the command. This integer
147 value is optional, but SHOULD be a positive integer > 10.
148
149 at=<hhmm>
150 The time (24-hour format) at which to run the command each day. If
151 set to a valid time (0000-2359), period is automatically set to
152 1440. This string argument is optional.
153
154 DAEMON
155 This section lists long running daemons to start before any SERVICES
156 are spawned. They will be shutdown when master(8) is exiting.
157
158 cmd=<no default>
159 The command (with options) to spawn as a child process. This string
160 argument is required.
161
163 # example cyrus.conf
164
165 START {
166 recover cmd="ctl_cyrusdb -r"
167 }
168
169 SERVICES {
170 imap cmd="imapd" listen="imap" prefork=1
171 imaps cmd="imapd -s" listen="imaps" prefork=0
172 lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp"
173 lmtp cmd="lmtpd" listen="localhost:lmtp"
174 }
175
176 EVENTS {
177 checkpoint cmd="ctl_cyrusdb -c" period=30
178 delprune cmd="cyr_expire -E 3" at=0400
179 tlsprune cmd="tls_prune" at=0400
180 }
181
182 DAEMON {
183 idled cmd="idled"
184 }
185
187 When TCP Wrappers is used to control access to Cyrus services, the name
188 of the service entry should be used as the process name in the
189 hosts_access(5) table. For instance, in the example above, "imap",
190 "imaps", "lmtpunix" and "lmtp" would be used as the process names.
191 This allows a single daemon such as imapd to be run in different modes
192 or configurations (i.e., SSL and non-SSL enabled) yet still have sepa‐
193 rate access control rules.
194
196 master(8), imapd(8), pop3d(8), lmtpd(8), timsieved(8), idled(8), noti‐
197 fyd(8), ctl_cyrusdb(8), ctl_deliver(8), tls_prune(8), hosts_access(5)
198
200 The Cyrus Team, Nic Bernstein (Onlight)
201
203 1993-2017, The Cyrus Team
204
205
206
207
2083.0.13 December 16, 2019 CYRUS.CONF(5)