Debian Codegraph @

doc/html/_sources/imap/reference/admin/locations/configuration-state.rst.txt

raw
1 .. _imap-admin-locations-config:
2
3 Configuration file locations
4 ============================
5
6 The main configuration file for Cyrus IMAP is :cyrusman:`imapd.conf(5)`
7 and its path is compiled into the executable files, based upon the
8 ``--sysconfdir`` build flag. For many utilities, this may be
9 overridden at runtime via the **-C** flag, followed by the name of the
10 configuration file to use. For example:
11
12 .. parsed-literal::
13
14 **ctl_mboxlist** **-C** */usr/local/etc/imapd.conf* **-d** **-f** *mailboxes.dump*
15
16 The main configuration directory is referred to as ``<configdirectory>``
17 in Cyrus IMAP documentation, and is set via the ``configdirectory``
18 entry in :cyrusman:`imapd.conf(5)`:
19
20 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
21 :start-after: startblob configdirectory
22 :end-before: endblob configdirectory
23
24 While Cyrus itself has no default values for this setting, most
25 distributions use ``/var/lib/imap`` or ``/var/lib/cyrus``.
26
27 State Databases
28 ---------------
29 Despite the name, most of what's stored in ``<configdirectory>`` is state
30 information. Here's a list of files typically located therein:
31
32 * :ref:`imap-concepts-deployment-db-annotations`
33 * :ref:`imap-concepts-deployment-db-deliver`
34 * :ref:`imap-concepts-deployment-db-mailboxes`
35 * :ref:`imap-concepts-deployment-db-fetchnews`
36 * :ref:`imap-concepts-deployment-db-pts`
37 * :ref:`imap-concepts-deployment-db-quotas`
38 * :ref:`imap-concepts-deployment-db-status`
39 * :ref:`imap-concepts-deployment-db-tls`
40 * :ref:`imap-concepts-deployment-db-userdeny`
41 * :ref:`imap-concepts-deployment-db-zoneinfo`
42
43 The links above document the purpose, DB type and choices for those
44 files. You may adjust the locations of these database files via various
45 settings in :cyrusman:`imapd.conf(5)`:
46
47 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
48 :start-after: startblob annotation_db_path
49 :end-before: endblob annotation_db_path
50
51 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
52 :start-after: startblob backup_db_path
53 :end-before: endblob backup_db_path
54
55 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
56 :start-after: startblob duplicate_db_path
57 :end-before: endblob duplicate_db_path
58
59 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
60 :start-after: startblob mboxlist_db_path
61 :end-before: endblob mboxlist_db_path
62
63 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
64 :start-after: startblob newsrc_db_path
65 :end-before: endblob newsrc_db_path
66
67 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
68 :start-after: startblob ptscache_db_path
69 :end-before: endblob ptscache_db_path
70
71 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
72 :start-after: startblob quota_db_path
73 :end-before: endblob quota_db_path
74
75 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
76 :start-after: startblob statuscache_db_path
77 :end-before: endblob statuscache_db_path
78
79 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
80 :start-after: startblob tls_sessions_db_path
81 :end-before: endblob tls_sessions_db_path
82
83 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
84 :start-after: startblob userdeny_db_path
85 :end-before: endblob userdeny_db_path
86
87 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
88 :start-after: startblob zoneinfo_db_path
89 :end-before: endblob zoneinfo_db_path
90
91 Ephemeral Databases
92 ^^^^^^^^^^^^^^^^^^^
93
94 Several of the state databases may be located in RAM-backed locations,
95 such as ``/run`` or ``/var/run`` or where ever your OS roots such
96 filesystems (i.e. ``tmpfs`` on Linux or ``mfs`` on FreeBSD). Cyrus 3.0 will
97 recreate the following databases for you automatically:
98
99 * duplicate delivery (deliver.db),
100 * TLS cache (tls_sessions.db),
101 * PTS cache (ptscache.db),
102 * STATUS cache (statuscache.db).
103
104 Relocating these DBs to ephemeral storage will place less IO load on
105 your disks and tend to run faster.
106
107 .. note::
108 Please be warned that some packagers place tasks such as
109 ``tlsprune`` (:cyrusman:`tls_prune(8)`) in the ``START{}`` stanza
110 of :cyrusman:`cyrus.conf(5)`. This will cause a startup problem if
111 the ``tls_sessions_db`` is not present. The solution to this is to
112 remove the ``tlsprune`` task from ``START{}`` and schedule it in
113 ``EVENTS{}``, further down.
114
115 State Directories
116 =================
117
118 In addition to the files, are several directories:
119
120 * lock (per-mailbox lock files)
121 * log (per-user telemetry log directories)
122 * proc (per-process state data)
123 * ptclient (PT Loader Unix-domain socket)
124 * quota (per-quotaroot quota state data)
125 * sieve (per-user sieve message filter scripts)
126 * socket (per-service Unix-domain sockets)
127 * sync (per-replica directories with sync log files)
128 * user (per-user DBs, see next section)
129
130 As with the DB files, above, many of these, too, may be relocated via
131 settings in :cyrusman:`imapd.conf(5)`:
132
133 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
134 :start-after: startblob mboxname_lockpath
135 :end-before: endblob mboxname_lockpath
136
137 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
138 :start-after: startblob proc_path
139 :end-before: endblob proc_path
140
141 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
142 :start-after: startblob ptloader_sock
143 :end-before: endblob ptloader_sock
144
145 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
146 :start-after: startblob quota_db_path
147 :end-before: endblob quota_db_path
148
149 .. note::
150
151 If your configuration uses ``quota_db: quotalegacy``, then
152 ``quota_db_path`` points to the base of the quota directory
153 hierarchy. If you use any other DB type, then this will be
154 the actual filename.
155
156 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
157 :start-after: startblob sieveusehomedir
158 :end-before: endblob sieveusehomedir
159
160 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
161 :start-after: startblob sievedir
162 :end-before: endblob sievedir
163
164 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
165 :start-after: startblob idlesocket
166 :end-before: endblob idlesocket
167
168 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
169 :start-after: startblob lmtpsocket
170 :end-before: endblob lmtpsocket
171
172 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
173 :start-after: startblob notifysocket
174 :end-before: endblob notifysocket
175
176 Per-user State Directories
177 ==========================
178
179 There are several things tracked per-user, and the data files for these
180 items, such as subscriptions and seen state, are stored in
181 <configdirectory>/user. These files may not be relocated from <configdirectory>. They
182 are:
183
184 * :ref:`imap-concepts-deployment-db-seen`
185 * :ref:`imap-concepts-deployment-db-sub`
186 * :ref:`imap-concepts-deployment-db-xapianactive`
187 * :ref:`imap-concepts-deployment-db-mboxkey`
188 * :ref:`imap-concepts-deployment-db-userdav`
189
190 Please follow those links for more information on these files.