Advertisement
Guest User

10-mail.conf

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