summaryrefslogtreecommitdiff
path: root/dovecot/conf.d/10-mail.conf
blob: ce951f1d3fe14d8f022f8827fd8c496cd8b41fdf (plain)
  1. ##
  2. ## Mailbox locations and namespaces
  3. ##
  4. # Location for users' mailboxes. The default is empty, which means that Dovecot
  5. # tries to find the mailboxes automatically. This won't work if the user
  6. # doesn't yet have any mail, so you should explicitly tell Dovecot the full
  7. # location.
  8. #
  9. # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
  10. # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
  11. # kept. This is called the "root mail directory", and it must be the first
  12. # path given in the mail_location setting.
  13. #
  14. # There are a few special variables you can use, eg.:
  15. #
  16. # %u - username
  17. # %n - user part in user@domain, same as %u if there's no domain
  18. # %d - domain part in user@domain, empty if there's no domain
  19. # %h - home directory
  20. #
  21. # See doc/wiki/Variables.txt for full list. Some examples:
  22. #
  23. # mail_location = maildir:~/Maildir
  24. # mail_location = mbox:~/mail:INBOX=/var/mail/%u
  25. # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
  26. #
  27. # <doc/wiki/MailLocation.txt>
  28. #
  29. mail_location = maildir:~/Maildir
  30. # If you need to set multiple mailbox locations or want to change default
  31. # namespace settings, you can do it by defining namespace sections.
  32. #
  33. # You can have private, shared and public namespaces. Private namespaces
  34. # are for user's personal mails. Shared namespaces are for accessing other
  35. # users' mailboxes that have been shared. Public namespaces are for shared
  36. # mailboxes that are managed by sysadmin. If you create any shared or public
  37. # namespaces you'll typically want to enable ACL plugin also, otherwise all
  38. # users can access all the shared mailboxes, assuming they have permissions
  39. # on filesystem level to do so.
  40. namespace inbox {
  41. # Namespace type: private, shared or public
  42. #type = private
  43. # Hierarchy separator to use. You should use the same separator for all
  44. # namespaces or some clients get confused. '/' is usually a good one.
  45. # The default however depends on the underlying mail storage format.
  46. #separator =
  47. # Prefix required to access this namespace. This needs to be different for
  48. # all namespaces. For example "Public/".
  49. #prefix =
  50. # Physical location of the mailbox. This is in same format as
  51. # mail_location, which is also the default for it.
  52. #location =
  53. # There can be only one INBOX, and this setting defines which namespace
  54. # has it.
  55. inbox = yes
  56. # If namespace is hidden, it's not advertised to clients via NAMESPACE
  57. # extension. You'll most likely also want to set list=no. This is mostly
  58. # useful when converting from another server with different namespaces which
  59. # you want to deprecate but still keep working. For example you can create
  60. # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
  61. #hidden = no
  62. # Show the mailboxes under this namespace with LIST command. This makes the
  63. # namespace visible for clients that don't support NAMESPACE extension.
  64. # "children" value lists child mailboxes, but hides the namespace prefix.
  65. #list = yes
  66. # Namespace handles its own subscriptions. If set to "no", the parent
  67. # namespace handles them (empty prefix should always have this as "yes")
  68. #subscriptions = yes
  69. # See 15-mailboxes.conf for definitions of special mailboxes.
  70. }
  71. # Example shared namespace configuration
  72. #namespace {
  73. #type = shared
  74. #separator = /
  75. # Mailboxes are visible under "shared/user@domain/"
  76. # %%n, %%d and %%u are expanded to the destination user.
  77. #prefix = shared/%%u/
  78. # Mail location for other users' mailboxes. Note that %variables and ~/
  79. # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
  80. # destination user's data.
  81. #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  82. # Use the default namespace for saving subscriptions.
  83. #subscriptions = no
  84. # List the shared/ namespace only if there are visible shared mailboxes.
  85. #list = children
  86. #}
  87. # Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
  88. #mail_shared_explicit_inbox = no
  89. # System user and group used to access mails. If you use multiple, userdb
  90. # can override these by returning uid or gid fields. You can use either numbers
  91. # or names. <doc/wiki/UserIds.txt>
  92. #mail_uid =
  93. #mail_gid =
  94. # Group to enable temporarily for privileged operations. Currently this is
  95. # used only with INBOX when either its initial creation or dotlocking fails.
  96. # Typically this is set to "mail" to give access to /var/mail.
  97. #mail_privileged_group =
  98. # Grant access to these supplementary groups for mail processes. Typically
  99. # these are used to set up access to shared mailboxes. Note that it may be
  100. # dangerous to set these if users can create symlinks (e.g. if "mail" group is
  101. # set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
  102. # mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
  103. #mail_access_groups =
  104. # Allow full filesystem access to clients. There's no access checks other than
  105. # what the operating system does for the active UID/GID. It works with both
  106. # maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
  107. # or ~user/.
  108. #mail_full_filesystem_access = no
  109. # Dictionary for key=value mailbox attributes. This is used for example by
  110. # URLAUTH and METADATA extensions.
  111. #mail_attribute_dict =
  112. # A comment or note that is associated with the server. This value is
  113. # accessible for authenticated users through the IMAP METADATA server
  114. # entry "/shared/comment".
  115. #mail_server_comment = ""
  116. # Indicates a method for contacting the server administrator. According to
  117. # RFC 5464, this value MUST be a URI (e.g., a mailto: or tel: URL), but that
  118. # is currently not enforced. Use for example mailto:admin@example.com. This
  119. # value is accessible for authenticated users through the IMAP METADATA server
  120. # entry "/shared/admin".
  121. #mail_server_admin =
  122. ##
  123. ## Mail processes
  124. ##
  125. # Don't use mmap() at all. This is required if you store indexes to shared
  126. # filesystems (NFS or clustered filesystem).
  127. #mmap_disable = no
  128. # Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
  129. # since version 3, so this should be safe to use nowadays by default.
  130. #dotlock_use_excl = yes
  131. # When to use fsync() or fdatasync() calls:
  132. # optimized (default): Whenever necessary to avoid losing important data
  133. # always: Useful with e.g. NFS when write()s are delayed
  134. # never: Never use it (best performance, but crashes can lose data)
  135. #mail_fsync = optimized
  136. # Locking method for index files. Alternatives are fcntl, flock and dotlock.
  137. # Dotlocking uses some tricks which may create more disk I/O than other locking
  138. # methods. NFS users: flock doesn't work, remember to change mmap_disable.
  139. #lock_method = fcntl
  140. # Directory in which LDA/LMTP temporarily stores incoming mails >128 kB.
  141. #mail_temp_dir = /tmp
  142. # Valid UID range for users, defaults to 500 and above. This is mostly
  143. # to make sure that users can't log in as daemons or other system users.
  144. # Note that denying root logins is hardcoded to dovecot binary and can't
  145. # be done even if first_valid_uid is set to 0.
  146. #first_valid_uid = 500
  147. #last_valid_uid = 0
  148. # Valid GID range for users, defaults to non-root/wheel. Users having
  149. # non-valid GID as primary group ID aren't allowed to log in. If user
  150. # belongs to supplementary groups with non-valid GIDs, those groups are
  151. # not set.
  152. #first_valid_gid = 1
  153. #last_valid_gid = 0
  154. # Maximum allowed length for mail keyword name. It's only forced when trying
  155. # to create new keywords.
  156. #mail_max_keyword_length = 50
  157. # ':' separated list of directories under which chrooting is allowed for mail
  158. # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
  159. # This setting doesn't affect login_chroot, mail_chroot or auth chroot
  160. # settings. If this setting is empty, "/./" in home dirs are ignored.
  161. # WARNING: Never add directories here which local users can modify, that
  162. # may lead to root exploit. Usually this should be done only if you don't
  163. # allow shell access for users. <doc/wiki/Chrooting.txt>
  164. #valid_chroot_dirs =
  165. # Default chroot directory for mail processes. This can be overridden for
  166. # specific users in user database by giving /./ in user's home directory
  167. # (eg. /home/./user chroots into /home). Note that usually there is no real
  168. # need to do chrooting, Dovecot doesn't allow users to access files outside
  169. # their mail directory anyway. If your home directories are prefixed with
  170. # the chroot directory, append "/." to mail_chroot. <doc/wiki/Chrooting.txt>
  171. #mail_chroot =
  172. # UNIX socket path to master authentication server to find users.
  173. # This is used by imap (for shared users) and lda.
  174. #auth_socket_path = /var/run/dovecot/auth-userdb
  175. # Directory where to look up mail plugins.
  176. #mail_plugin_dir = /usr/lib/dovecot/modules
  177. # Space separated list of plugins to load for all services. Plugins specific to
  178. # IMAP, LDA, etc. are added to this list in their own .conf files.
  179. mail_plugins = fts fts_lucene
  180. ##
  181. ## Mailbox handling optimizations
  182. ##
  183. # Mailbox list indexes can be used to optimize IMAP STATUS commands. They are
  184. # also required for IMAP NOTIFY extension to be enabled.
  185. mailbox_list_index = yes
  186. # The minimum number of mails in a mailbox before updates are done to cache
  187. # file. This allows optimizing Dovecot's behavior to do less disk writes at
  188. # the cost of more disk reads.
  189. #mail_cache_min_mail_count = 0
  190. # When IDLE command is running, mailbox is checked once in a while to see if
  191. # there are any new mails or other changes. This setting defines the minimum
  192. # time to wait between those checks. Dovecot can also use inotify and
  193. # kqueue to find out immediately when changes occur.
  194. #mailbox_idle_check_interval = 30 secs
  195. # Save mails with CR+LF instead of plain LF. This makes sending those mails
  196. # take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
  197. # But it also creates a bit more disk I/O which may just make it slower.
  198. # Also note that if other software reads the mboxes/maildirs, they may handle
  199. # the extra CRs wrong and cause problems.
  200. #mail_save_crlf = no
  201. # Max number of mails to keep open and prefetch to memory. This only works with
  202. # some mailbox formats and/or operating systems.
  203. #mail_prefetch_count = 0
  204. # How often to scan for stale temporary files and delete them (0 = never).
  205. # These should exist only after Dovecot dies in the middle of saving mails.
  206. #mail_temp_scan_interval = 1w
  207. ##
  208. ## Maildir-specific settings
  209. ##
  210. # By default LIST command returns all entries in maildir beginning with a dot.
  211. # Enabling this option makes Dovecot return only entries which are directories.
  212. # This is done by stat()ing each entry, so it causes more disk I/O.
  213. # (For systems setting struct dirent->d_type, this check is free and it's
  214. # done always regardless of this setting)
  215. #maildir_stat_dirs = no
  216. # When copying a message, do it with hard links whenever possible. This makes
  217. # the performance much better, and it's unlikely to have any side effects.
  218. #maildir_copy_with_hardlinks = yes
  219. # Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only
  220. # when its mtime changes unexpectedly or when we can't find the mail otherwise.
  221. maildir_very_dirty_syncs = yes
  222. # If enabled, Dovecot doesn't use the S=<size> in the Maildir filenames for
  223. # getting the mail's physical size, except when recalculating Maildir++ quota.
  224. # This can be useful in systems where a lot of the Maildir filenames have a
  225. # broken size. The performance hit for enabling this is very small.
  226. #maildir_broken_filename_sizes = no
  227. # Always move mails from new/ directory to cur/, even when the \Recent flags
  228. # aren't being reset.
  229. #maildir_empty_new = no
  230. ##
  231. ## mbox-specific settings
  232. ##
  233. # Which locking methods to use for locking mbox. There are four available:
  234. # dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
  235. # solution. If you want to use /var/mail/ like directory, the users
  236. # will need write access to that directory.
  237. # dotlock_try: Same as dotlock, but if it fails because of permissions or
  238. # because there isn't enough disk space, just skip it.
  239. # fcntl : Use this if possible. Works with NFS too if lockd is used.
  240. # flock : May not exist in all systems. Doesn't work with NFS.
  241. # lockf : May not exist in all systems. Doesn't work with NFS.
  242. #
  243. # You can use multiple locking methods; if you do the order they're declared
  244. # in is important to avoid deadlocks if other MTAs/MUAs are using multiple
  245. # locking methods as well. Some operating systems don't allow using some of
  246. # them simultaneously.
  247. #
  248. # The Debian value for mbox_write_locks differs from upstream Dovecot. It is
  249. # changed to be compliant with Debian Policy (section 11.6) for NFS safety.
  250. # Dovecot: mbox_write_locks = dotlock fcntl
  251. # Debian: mbox_write_locks = fcntl dotlock
  252. #
  253. #mbox_read_locks = fcntl
  254. #mbox_write_locks = fcntl dotlock
  255. # Maximum time to wait for lock (all of them) before aborting.
  256. #mbox_lock_timeout = 5 mins
  257. # If dotlock exists but the mailbox isn't modified in any way, override the
  258. # lock file after this much time.
  259. #mbox_dotlock_change_timeout = 2 mins
  260. # When mbox changes unexpectedly we have to fully read it to find out what
  261. # changed. If the mbox is large this can take a long time. Since the change
  262. # is usually just a newly appended mail, it'd be faster to simply read the
  263. # new mails. If this setting is enabled, Dovecot does this but still safely
  264. # fallbacks to re-reading the whole mbox file whenever something in mbox isn't
  265. # how it's expected to be. The only real downside to this setting is that if
  266. # some other MUA changes message flags, Dovecot doesn't notice it immediately.
  267. # Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK
  268. # commands.
  269. #mbox_dirty_syncs = yes
  270. # Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
  271. # EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
  272. #mbox_very_dirty_syncs = no
  273. # Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
  274. # commands and when closing the mailbox). This is especially useful for POP3
  275. # where clients often delete all mails. The downside is that our changes
  276. # aren't immediately visible to other MUAs.
  277. #mbox_lazy_writes = yes
  278. # If mbox size is smaller than this (e.g. 100k), don't write index files.
  279. # If an index file already exists it's still read, just not updated.
  280. #mbox_min_index_size = 0
  281. # Mail header selection algorithm to use for MD5 POP3 UIDLs when
  282. # pop3_uidl_format=%m. For backwards compatibility we use apop3d inspired
  283. # algorithm, but it fails if the first Received: header isn't unique in all
  284. # mails. An alternative algorithm is "all" that selects all headers.
  285. #mbox_md5 = apop3d
  286. ##
  287. ## mdbox-specific settings
  288. ##
  289. # Maximum dbox file size until it's rotated.
  290. #mdbox_rotate_size = 2M
  291. # Maximum dbox file age until it's rotated. Typically in days. Day begins
  292. # from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled.
  293. #mdbox_rotate_interval = 0
  294. # When creating new mdbox files, immediately preallocate their size to
  295. # mdbox_rotate_size. This setting currently works only in Linux with some
  296. # filesystems (ext4, xfs).
  297. #mdbox_preallocate_space = no
  298. ##
  299. ## Mail attachments
  300. ##
  301. # sdbox and mdbox support saving mail attachments to external files, which
  302. # also allows single instance storage for them. Other backends don't support
  303. # this for now.
  304. # Directory root where to store mail attachments. Disabled, if empty.
  305. #mail_attachment_dir =
  306. # Attachments smaller than this aren't saved externally. It's also possible to
  307. # write a plugin to disable saving specific attachments externally.
  308. #mail_attachment_min_size = 128k
  309. # Filesystem backend to use for saving attachments:
  310. # posix : No SiS done by Dovecot (but this might help FS's own deduplication)
  311. # sis posix : SiS with immediate byte-by-byte comparison during saving
  312. # sis-queue posix : SiS with delayed comparison and deduplication
  313. #mail_attachment_fs = sis posix
  314. # Hash format to use in attachment filenames. You can add any text and
  315. # variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}.
  316. # Variables can be truncated, e.g. %{sha256:80} returns only first 80 bits
  317. #mail_attachment_hash = %{sha1}