Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

411 lines
17KB

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