22
By default no namespaces are explicitly defined in 'dovecot.conf'. In this
23
situation Dovecot creates a private namespace automatically. This automatic
24
namespace creation isn't done when namespaces are defined, so if you intend to
25
simply add a new namespace, be sure to also add the default private namespace.
22
In v2.1+ there's a default inbox namespace added in '10-mail.conf'. If the
23
configuration doesn't explicitly specify a namespace (as was in v2.0 and older)
24
a default namespace is created automatically.
26
The section name in namespaces (e.g. 'namespace sectionname { .. } ' is used
27
only internally within configuration. It's not required at all, but it allows
28
you to update an existing namespace (like how '15-mailboxes.conf' does) or have
29
userdb override namespace settings for specific users
30
('namespace/sectionname/prefix=foo/').
27
35
There are 3 types of namespaces:
46
54
However, changing the separator doesn't change the on-disk "layout separator".
48
+-----------------------------+-----------+-----------+---------+---------------------+
49
| mail_location | Layout | Separator | Mailbox | Directory |
50
| | separator | | name | |
51
+-----------------------------+-----------+-----------+---------+---------------------+
52
| maildir:~/Maildir | . | . | foo.bar | ~/Maildir/.foo.bar/ |
53
+-----------------------------+-----------+-----------+---------+---------------------+
54
| maildir:~/Maildir | . | / | foo/bar | ~/Maildir/.foo.bar/ |
55
+-----------------------------+-----------+-----------+---------+---------------------+
56
| maildir:~/Maildir:LAYOUT=fs | / | . | foo.bar | ~/Maildir/foo/bar/ |
57
+-----------------------------+-----------+-----------+---------+---------------------+
58
| maildir:~/Maildir:LAYOUT=fs | / | / | foo/bar | ~/Maildir/foo/bar/ |
59
+-----------------------------+-----------+-----------+---------+---------------------+
56
+-----------------------------+--------+-----+----------+---------------------+
57
| mail_location | Layout | NS | Mailbox | Directory |
58
| | sep | sep | name | |
59
+-----------------------------+--------+-----+----------+---------------------+
60
| maildir:~/Maildir | . | . | foo.bar | ~/Maildir/.foo.bar/ |
61
+-----------------------------+--------+-----+----------+---------------------+
62
| maildir:~/Maildir | . | / | foo/bar | ~/Maildir/.foo.bar/ |
63
+-----------------------------+--------+-----+----------+---------------------+
64
| maildir:~/Maildir:LAYOUT=fs | / | . | foo.bar | ~/Maildir/foo/bar/ |
65
+-----------------------------+--------+-----+----------+---------------------+
66
| maildir:~/Maildir:LAYOUT=fs | / | / | foo/bar | ~/Maildir/foo/bar/ |
67
+-----------------------------+--------+-----+----------+---------------------+
61
Note how the "Separator" changes only the "Mailbox name", but doesn't change
62
the directory where the mails are stored. The "layout separator" can only be
63
changed by changing the LAYOUT, which also affects the entire directory
69
Note how the "namespace separator" changes only the "Mailbox name", but doesn't
70
change the directory where the mails are stored. The "layout separator" can
71
only be changed by changing the LAYOUT, which also affects the entire directory
66
74
The layout separator also restricts the mailbox names. For example if the
69
77
[Plugins.Listescape.txt] plugin to add escape the mailbox names as necessary.
71
79
A commonly used separator is '/'. It probably causes the least amount of
72
trouble with different IMAP clients. '^' separator is troublesome with
80
trouble with different IMAP clients.'^' separator is troublesome with
81
Thunderbird.When '\' should be used it must be quoted, so one sets separator =
75
84
You should use the same hierarchy separator for all namespaces. All list=yes
76
85
namespaces must use the same separator, but if you find it necessary (e.g. for
92
* type: See the "Namespace types" section above
93
* separator: See the "Hierarchy separators" section above
83
94
* prefix: The namespace prefix how it's visible in the NAMESPACE reply (if
84
95
hidden=no) and mailbox list (if list=yes).
85
96
* location: <Mailbox location> [MailLocation.txt]. The default is to use
97
108
with prefix=foo/bar/, Dovecot first sees if there's a prefix=foo/ namespace
98
109
with subscriptions=yes and then a namespace with an empty prefix. If neither
99
110
is found, an error is given.
111
* ignore_on_failure: Normally Dovecot fails if it can't successfully create a
112
namespace. Set this to "yes" to continue even if the namespace creation
113
fails (e.g. public namespace points to inaccessible location).
114
* disabled: Set to "yes" to quickly disable this namespace. Especially useful
115
when returned by a userdb lookup to give per-user namespaces.
116
* alias_for: If multiple namespaces point to the same location, they should be
117
marked as aliases against one primary namespace. This avoids duplicating
118
work for some commands (listing the same mailbox multiple times). The value
119
for alias_for is the primary namespace's prefix. For example if the primary
120
namespace has empty prefix, set 'alias_for=' for the alias namespace. Or if
121
primary has 'prefix=INBOX/', use 'alias_for=INBOX/'.
122
* mailbox { .. } settings can be used to autocreate/autosubscribe mailboxes
123
and set their SPECIAL-USE flags.
130
154
---%<-------------------------------------------------------------------------
132
Without the 'list = no' setting in the first namespace, clients see the "#mbox"
133
namespace as a non-selectable mailbox named "#mbox" and having child mailboxes
134
(ie. like a directory). The child mailboxes are all the mbox files in '~/mail'
156
Without the 'list = no' setting in the first namespace, clients would see the
157
"#mbox" namespace as a non-selectable mailbox named "#mbox" but with child
158
mailboxes (the mbox files in the '~/mail' directory), ie. like a directory. So
159
specifically with 'inbox = yes', having 'list = no' is often desirable.
137
161
Backwards Compatibility: UW-IMAP
138
162
--------------------------------
175
199
Backwards Compatibility: Courier IMAP
176
200
-------------------------------------
178
You can continue using the same INBOX. namespace as Courier:
202
*Recommended:* You can continue using the same INBOX. namespace as Courier:
180
204
---%<-------------------------------------------------------------------------
186
210
---%<-------------------------------------------------------------------------
188
Alternatively you can create the INBOX. as a compatibility name, so old clients
189
can continue using it while new clients will use the empty prefix namespace:
212
*Alternatively:* Create the INBOX. as a compatibility name, so old clients can
213
continue using it while new clients will use the empty prefix namespace:
191
215
---%<-------------------------------------------------------------------------
210
234
"foo" child or the root "foo" mailbox in "INBOX." compatibility namespace. With
211
235
"separator=/" the difference is clear with "INBOX/foo" vs. "INBOX.foo".
237
The alternative configuration is not recommended, as it may introduce there
240
* Although clients may do LIST INBOX.*, they may still do LSUB *, resulting in
242
* If clients used empty namespace with Courier, they now see the mailboxes
243
with different names, resulting in redownloading of all mails (except
245
* Some clients may have random errors auto-detecting the proper default
246
folders (Sent, Drafts etc) if the client settings refer to old paths while
247
the server lists new paths.
213
249
Per-user Namespace Location From SQL
214
250
------------------------------------