Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

374 rader
15 KiB

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