Advertisement
Theatre

Theatre - Dovecot conf

Jun 21st, 2011
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.98 KB | None | 0 0
  1. ## Dovecot configuration file
  2.  
  3. # If you're in a hurry, see http://wiki.dovecot.org/QuickConfiguration
  4.  
  5. # "dovecot -n" command gives a clean output of the changed settings. Use it
  6. # instead of copy&pasting this file when posting to the Dovecot mailing list.
  7.  
  8. # '#' character and everything after it is treated as comments. Extra spaces
  9. # and tabs are ignored. If you want to use either of these explicitly, put the
  10. # value inside quotes, eg.: key = "# char and trailing whitespace "
  11.  
  12. # Default values are shown for each setting, it's not required to uncomment
  13. # any of the lines.
  14.  
  15. # Base directory where to store runtime data.
  16. #base_dir = /var/run/dovecot/
  17.  
  18. # Protocols we want to be serving: imap imaps pop3 pop3s
  19. # If you only want to use dovecot-auth, you can set this to "none".
  20. #protocols = imap imaps pop3 pop3s
  21.  
  22. # IP or host address where to listen in for connections. It's not currently
  23. # possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
  24. # "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
  25. # interfaces depending on the operating system.
  26. #
  27. # If you want to specify ports for each service, you will need to configure
  28. # these settings inside the protocol imap/pop3 { ... } section, so you can
  29. # specify different ports for IMAP/POP3. For example:
  30. # protocol imap {
  31. # listen = *:10143
  32. # ssl_listen = *:10943
  33. # ..
  34. # }
  35. # protocol pop3 {
  36. # listen = *:10100
  37. # ..
  38. # }
  39. #listen = [::]
  40.  
  41. # Disable LOGIN command and all other plaintext authentications unless
  42. # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
  43. # matches the local IP (ie. you're connecting from the same computer), the
  44.  
  45. # connection is considered secure and plaintext authentication is allowed.
  46. #disable_plaintext_auth = no
  47.  
  48. # Should all IMAP and POP3 processes be killed when Dovecot master process
  49. # shuts down. Setting this to "no" means that Dovecot can be upgraded without
  50. # forcing existing client connections to close (although that could also be
  51. # a problem if the upgrade is eg. because of a security fix). This however
  52. # means that after master process has died, the client processes can't write
  53. # to log files anymore.
  54. #shutdown_clients = yes
  55.  
  56. ##
  57. ## Logging
  58. ##
  59.  
  60. # Log file to use for error messages, instead of sending them to syslog.
  61. # /dev/stderr can be used to log into stderr.
  62. #log_path =
  63.  
  64. # Log file to use for informational and debug messages.
  65. # Default is the same as log_path.
  66. #info_log_path =
  67.  
  68. # Prefix for each line written to log file. % codes are in strftime(3)
  69. # format.
  70. #log_timestamp = "%b %d %H:%M:%S "
  71.  
  72. # Syslog facility to use if you're logging to syslog. Usually if you don't
  73. # want to use "mail", you'll use local0..local7. Also other standard
  74. # facilities are supported.
  75. #syslog_facility = mail
  76.  
  77. ##
  78. ## SSL settings
  79. ##
  80.  
  81. # IP or host address where to listen in for SSL connections. Defaults
  82. # to above if not specified.
  83. #ssl_listen =
  84.  
  85. # Disable SSL/TLS support.
  86.  
  87. #ssl_disable = no
  88.  
  89. # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
  90. # dropping root privileges, so keep the key file unreadable by anyone but
  91. # root. Included doc/mkcert.sh can be used to easily generate self-signed
  92. # certificate, just make sure to update the domains in dovecot-openssl.cnf
  93. #ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
  94. #ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
  95.  
  96. # If key file is password protected, give the password here. Alternatively
  97. # give it when starting dovecot with -p parameter. Since this file is often
  98. # world-readable, you may want to place this setting instead to a different
  99. # root owned 0600 file by using !include_try <path>.
  100. #ssl_key_password =
  101.  
  102. # File containing trusted SSL certificate authorities. Usually not needed.
  103. # The CAfile should contain the CA-certificate(s) followed by the matching
  104. # CRL(s). CRL checking is new in dovecot .rc1
  105. #ssl_ca_file =
  106.  
  107. # Request client to send a certificate. If you also want to require it, set
  108. # ssl_require_client_cert=yes in auth section.
  109. #ssl_verify_client_cert = no
  110.  
  111. # How often to regenerate the SSL parameters file. Generation is quite CPU
  112. # intensive operation. The value is in hours, 0 disables regeneration
  113. # entirely.
  114. #ssl_parameters_regenerate = 168
  115.  
  116. # SSL ciphers to use
  117. #ssl_cipher_list = ALL:!LOW
  118.  
  119. # Show protocol level SSL errors.
  120. #verbose_ssl = no
  121.  
  122. ##
  123. ## Login processes
  124. ##
  125.  
  126. # <doc/wiki/LoginProcess.txt>
  127.  
  128.  
  129. # Directory where authentication process places authentication UNIX sockets
  130. # which login needs to be able to connect to. The sockets are created when
  131. # running as root, so you don't have to worry about permissions. Note that
  132. # everything in this directory is deleted when Dovecot is started.
  133. #login_dir = /var/run/dovecot/login
  134.  
  135. # chroot login process to the login_dir. Only reason not to do this is if you
  136. # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
  137. #login_chroot = yes
  138.  
  139. # User to use for the login process. Create a completely new user for this,
  140. # and don't use it anywhere else. The user must also belong to a group where
  141. # only it has access, it's used to control access for authentication process.
  142. # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
  143. #login_user = dovecot
  144.  
  145. # Set max. process size in megabytes. If you don't use
  146. # login_process_per_connection you might need to grow this.
  147. #login_process_size = 64
  148.  
  149. # Should each login be processed in it's own process (yes), or should one
  150. # login process be allowed to process multiple connections (no)? Yes is more
  151. # secure, espcially with SSL/TLS enabled. No is faster since there's no need
  152. # to create processes all the time.
  153. #login_process_per_connection = yes
  154.  
  155. # Number of login processes to keep for listening new connections.
  156. #login_processes_count = 3
  157.  
  158. # Maximum number of login processes to create. The listening process count
  159. # usually stays at login_processes_count, but when multiple users start logging
  160. # in at the same time more extra processes are created. To prevent fork-bombing
  161. # we check only once in a second if new processes should be created - if all
  162. # of them are used at the time, we double their amount until the limit set by
  163. # this setting is reached.
  164. #login_max_processes_count = 128
  165.  
  166. # Maximum number of connections allowed per each login process. This setting
  167. # is used only if login_process_per_connection=no. Once the limit is reached,
  168. # the process notifies master so that it can create a new login process.
  169. # You should make sure that the process has at least
  170.  
  171. # 16 + login_max_connections * 2 available file descriptors.
  172. #login_max_connections = 256
  173.  
  174. # Greeting message for clients.
  175. #login_greeting = Dovecot ready.
  176.  
  177. # Space-separated list of elements we want to log. The elements which have
  178. # a non-empty variable value are joined together to form a comma-separated
  179. # string.
  180. #login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
  181.  
  182. # Login log format. %$ contains login_log_format_elements string, %s contains
  183. # the data we want to log.
  184. #login_log_format = %$: %s
  185.  
  186. ##
  187. ## Mailbox locations and namespaces
  188. ##
  189.  
  190. # Location for users' mailboxes. This is the same as the old default_mail_env
  191. # setting. The default is empty, which means that Dovecot tries to find the
  192. # mailboxes automatically. This won't work if the user doesn't have any mail
  193. # yet, so you should explicitly tell Dovecot the full location.
  194. #
  195. # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
  196. # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
  197. # kept. This is called the "root mail directory", and it must be the first
  198. # path given in the mail_location setting.
  199. #
  200. # There are a few special variables you can use, eg.:
  201. #
  202. # %u - username
  203. # %n - user part in user@domain, same as %u if there's no domain
  204. # %d - domain part in user@domain, empty if there's no domain
  205. # %h - home directory
  206. #
  207. # See doc/wiki/Variables.txt for full list. Some examples:
  208. #
  209. # mail_location = maildir:~/Maildir
  210. mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
  211. # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
  212.  
  213. #
  214. # <doc/wiki/MailLocation.txt>
  215. #
  216. # mail_location =
  217.  
  218. # If you need to set multiple mailbox locations or want to change default
  219. # namespace settings, you can do it by defining namespace sections.
  220. # NOTE: Namespaces currently work ONLY with IMAP! POP3 and LDA currently ignore
  221. # namespaces completely, they use only the mail_location setting.
  222. #
  223. # You can have private, shared and public namespaces. The only difference
  224. # between them is how Dovecot announces them to client via NAMESPACE
  225. # extension. Shared namespaces are meant for user-owned mailboxes which are
  226. # shared to other users, while public namespaces are for more globally
  227. # accessible mailboxes.
  228. #
  229. # REMEMBER: If you add any namespaces, the default namespace must be added
  230. # explicitly, ie. mail_location does nothing unless you have a namespace
  231. # without a location setting. Default namespace is simply done by having a
  232. # namespace with empty prefix.
  233. #namespace private {
  234. # Hierarchy separator to use. You should use the same separator for all
  235. # namespaces or some clients get confused. '/' is usually a good one.
  236. # The default however depends on the underlying mail storage format.
  237. #separator =
  238.  
  239. # Prefix required to access this namespace. This needs to be different for
  240. # all namespaces. For example "Public/".
  241. #prefix =
  242.  
  243. # Physical location of the mailbox. This is in same format as
  244. # mail_location, which is also the default for it.
  245. #location =
  246.  
  247. # There can be only one INBOX, and this setting defines which namespace
  248. # has it.
  249. #inbox = yes
  250.  
  251. # If namespace is hidden, it's not advertised to clients via NAMESPACE
  252. # extension or shown in LIST replies. This is mostly useful when converting
  253. # from another server with different namespaces which you want to depricate
  254.  
  255. # but still keep working. For example you can create hidden namespaces with
  256. # prefixes "~/mail/", "~%u/mail/" and "mail/".
  257. #hidden = yes
  258. #}
  259.  
  260. # Group to enable temporarily for privileged operations. Currently this is
  261. # used only for creating mbox dotlock files when creation fails for INBOX.
  262. # Typically this is set to "mail" to give access to /var/mail.
  263. #mail_privileged_group =
  264.  
  265. # Grant access to these supplementary groups for mail processes. Typically
  266. # these are used to set up access to shared mailboxes. Note that it may be
  267. # dangerous to set these if users can create symlinks (e.g. if "mail" group is
  268. # set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
  269. # mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
  270. #mail_access_groups =
  271.  
  272. # Allow full filesystem access to clients. There's no access checks other than
  273. # what the operating system does for the active UID/GID. It works with both
  274. # maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
  275. # or ~user/.
  276. #mail_full_filesystem_access = no
  277.  
  278. ##
  279. ## Mail processes
  280. ##
  281.  
  282. # Enable mail process debugging. This can help you figure out why Dovecot
  283. # isn't finding your mails.
  284. #mail_debug = no
  285.  
  286. # Log prefix for mail processes. See doc/wiki/Variables.txt for list of
  287. # possible variables you can use.
  288. #mail_log_prefix = "%Us(%u): "
  289.  
  290. # Max. number of lines a mail process is allowed to log per second before it's
  291. # throttled. 0 means unlimited. Typically there's no need to change this
  292. # unless you're using mail_log plugin, which may log a lot.
  293. #mail_log_max_lines_per_sec = 10
  294.  
  295. # Don't use mmap() at all. This is required if you store indexes to shared
  296.  
  297. # filesystems (NFS or clustered filesystem).
  298. #mmap_disable = no
  299.  
  300. # Don't write() to mmaped files. This is required for some operating systems
  301. # which use separate caches for them, such as OpenBSD.
  302. #mmap_no_write = no
  303.  
  304. # Rely on O_EXCL to work when creating dotlock files. The default is to use
  305. # hard linking. O_EXCL makes the dotlocking faster, but it doesn't always
  306. # work with NFS.
  307. #dotlock_use_excl = no
  308.  
  309. # Don't use fsync() or fdatasync() calls. This makes the performance better
  310. # at the cost of potential data loss if the server (or the file server)
  311. # goes down.
  312. #fsync_disable = no
  313.  
  314. # Locking method for index files. Alternatives are fcntl, flock and dotlock.
  315. # Dotlocking uses some tricks which may create more disk I/O than other locking
  316. # methods. NFS users: flock doesn't work, remember to change mmap_disable.
  317. #lock_method = fcntl
  318.  
  319. # Drop all privileges before exec()ing the mail process. This is mostly
  320. # meant for debugging, otherwise you don't get core dumps. It could be a small
  321. # security risk if you use single UID for multiple users, as the users could
  322. # ptrace() each others processes then.
  323. #mail_drop_priv_before_exec = no
  324.  
  325. # Show more verbose process titles (in ps). Currently shows user name and
  326. # IP address. Useful for seeing who are actually using the IMAP processes
  327. # (eg. shared mailboxes or if same uid is used for multiple accounts).
  328. #verbose_proctitle = no
  329.  
  330. # Valid UID range for users, defaults to 500 and above. This is mostly
  331. # to make sure that users can't log in as daemons or other system users.
  332. # Note that denying root logins is hardcoded to dovecot binary and can't
  333. # be done even if first_valid_uid is set to 0.
  334. #first_valid_uid = 500
  335. #last_valid_uid = 0
  336.  
  337. # Valid GID range for users, defaults to non-root/wheel. Users having
  338.  
  339. # non-valid GID as primary group ID aren't allowed to log in. If user
  340. # belongs to supplementary groups with non-valid GIDs, those groups are
  341. # not set.
  342. #first_valid_gid = 1
  343. #last_valid_gid = 0
  344.  
  345. # Maximum number of running mail processes. When this limit is reached,
  346. # new users aren't allowed to log in.
  347. #max_mail_processes = 1024
  348.  
  349. # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  350. # files, so it shouldn't harm much even if this limit is set pretty high.
  351. #mail_process_size = 256
  352.  
  353. # Maximum allowed length for mail keyword name. It's only forced when trying
  354. # to create new keywords.
  355. #mail_max_keyword_length = 50
  356.  
  357. # ':' separated list of directories under which chrooting is allowed for mail
  358. # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
  359. # This setting doesn't affect login_chroot or auth chroot variables.
  360. # WARNING: Never add directories here which local users can modify, that
  361. # may lead to root exploit. Usually this should be done only if you don't
  362. # allow shell access for users. <doc/wiki/Chrooting.txt>
  363. #valid_chroot_dirs =
  364.  
  365. # Default chroot directory for mail processes. This can be overridden for
  366. # specific users in user database by giving /./ in user's home directory
  367. # (eg. /home/./user chroots into /home). Note that usually there is no real
  368. # need to do chrooting, Dovecot doesn't allow users to access files outside
  369. # their mail directory anyway. <doc/wiki/Chrooting.txt>
  370. #mail_chroot =
  371.  
  372. ##
  373. ## Mailbox handling optimizations
  374. ##
  375.  
  376. # Space-separated list of fields to initially save into cache file. Currently
  377. # these fields are allowed:
  378. #
  379. # flags, date.sent, date.received, size.virtual, size.physical
  380.  
  381. # mime.parts, imap.body, imap.bodystructure
  382. #
  383. # Different IMAP clients work in different ways, so they benefit from
  384. # different cached fields. Some do not benefit from them at all. Caching more
  385. # than necessary generates useless disk I/O, so you don't want to do that
  386. # either.
  387. #
  388. # Dovecot attempts to automatically figure out what client wants and it keeps
  389. # only that. However the first few times a mailbox is opened, Dovecot hasn't
  390. # yet figured out what client needs, so it may not perform optimally. If you
  391. # know what fields the majority of your clients need, it may be useful to set
  392. # these fields by hand. If client doesn't actually use them, Dovecot will
  393. # eventually drop them.
  394. #
  395. # Usually you should just leave this field alone. The potential benefits are
  396. # typically unnoticeable.
  397. #mail_cache_fields =
  398.  
  399. # Space-separated list of fields that Dovecot should never save to cache file.
  400. # Useful if you want to save disk space at the cost of more I/O when the fields
  401. # needed.
  402. #mail_never_cache_fields =
  403.  
  404. # The minimum number of mails in a mailbox before updates are done to cache
  405. # file. This allows optimizing Dovecot's behavior to do less disk writes at
  406. # the cost of more disk reads.
  407. #mail_cache_min_mail_count = 0
  408.  
  409. # When IDLE command is running, mailbox is checked once in a while to see if
  410. # there are any new mails or other changes. This setting defines the minimum
  411. # time in seconds to wait between those checks. Dovecot can also use dnotify,
  412. # inotify and kqueue to find out immediately when changes occur.
  413. #mailbox_idle_check_interval = 30
  414.  
  415. # Save mails with CR+LF instead of plain LF. This makes sending those mails
  416. # take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
  417. # But it also creates a bit more disk I/O which may just make it slower.
  418. # Also note that if other software reads the mboxes/maildirs, they may handle
  419. # the extra CRs wrong and cause problems.
  420. #mail_save_crlf = no
  421.  
  422.  
  423. ##
  424. ## Maildir-specific settings
  425. ##
  426.  
  427. # By default LIST command returns all entries in maildir beginning with a dot.
  428. # Enabling this option makes Dovecot return only entries which are directories.
  429. # This is done by stat()ing each entry, so it causes more disk I/O.
  430. # (For systems setting struct dirent->d_type, this check is free and it's
  431. # done always regardless of this setting)
  432. #maildir_stat_dirs = no
  433.  
  434. # When copying a message, do it with hard links whenever possible. This makes
  435. # the performance much better, and it's unlikely to have any side effects.
  436. #maildir_copy_with_hardlinks = no
  437.  
  438. # When copying a message, try to preserve the base filename. Only if the
  439. # destination mailbox already contains the same name (ie. the mail is being
  440. # copied there twice), a new name is given. The destination filename check is
  441. # done only by looking at dovecot-uidlist file, so if something outside
  442. # Dovecot does similar filename preserving copies, you may run into problems.
  443. # NOTE: This setting requires maildir_copy_with_hardlinks = yes to work.
  444. #maildir_copy_preserve_filename = no
  445.  
  446. ##
  447. ## mbox-specific settings
  448. ##
  449.  
  450. # Which locking methods to use for locking mbox. There are four available:
  451. # dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
  452. # solution. If you want to use /var/mail/ like directory, the users
  453. # will need write access to that directory.
  454. # fcntl : Use this if possible. Works with NFS too if lockd is used.
  455. # flock : May not exist in all systems. Doesn't work with NFS.
  456. # lockf : May not exist in all systems. Doesn't work with NFS.
  457. #
  458. # You can use multiple locking methods; if you do the order they're declared
  459. # in is important to avoid deadlocks if other MTAs/MUAs are using multiple
  460. # locking methods as well. Some operating systems don't allow using some of
  461. # them simultaneously.
  462. #mbox_read_locks = fcntl
  463. #mbox_write_locks = fcntl
  464.  
  465.  
  466. # Maximum time in seconds to wait for lock (all of them) before aborting.
  467. #mbox_lock_timeout = 300
  468.  
  469. # If dotlock exists but the mailbox isn't modified in any way, override the
  470. # lock file after this many seconds.
  471. #mbox_dotlock_change_timeout = 120
  472.  
  473. # When mbox changes unexpectedly we have to fully read it to find out what
  474. # changed. If the mbox is large this can take a long time. Since the change
  475. # is usually just a newly appended mail, it'd be faster to simply read the
  476. # new mails. If this setting is enabled, Dovecot does this but still safely
  477. # fallbacks to re-reading the whole mbox file whenever something in mbox isn't
  478. # how it's expected to be. The only real downside to this setting is that if
  479. # some other MUA changes message flags, Dovecot doesn't notice it immediately.
  480. # Note that a full sync is done with SELECT, EXAMINE, EXPUNGE and CHECK
  481. # commands.
  482. #mbox_dirty_syncs = yes
  483.  
  484. # Like mbox_dirty_syncs, but don't do full syncs even with SELECT, EXAMINE,
  485. # EXPUNGE or CHECK commands. If this is set, mbox_dirty_syncs is ignored.
  486. #mbox_very_dirty_syncs = no
  487.  
  488. # Delay writing mbox headers until doing a full write sync (EXPUNGE and CHECK
  489. # commands and when closing the mailbox). This is especially useful for POP3
  490. # where clients often delete all mails. The downside is that our changes
  491. # aren't immediately visible to other MUAs.
  492. #mbox_lazy_writes = yes
  493.  
  494. # If mbox size is smaller than this (in kilobytes), don't write index files.
  495. # If an index file already exists it's still read, just not updated.
  496. #mbox_min_index_size = 0
  497.  
  498. ##
  499. ## dbox-specific settings
  500. ##
  501.  
  502. # Maximum dbox file size in kilobytes until it's rotated.
  503. #dbox_rotate_size = 2048
  504.  
  505. # Minimum dbox file size in kilobytes before it's rotated
  506.  
  507. # (overrides dbox_rotate_days)
  508. #dbox_rotate_min_size = 16
  509.  
  510. # Maximum dbox file age in days until it's rotated. Day always begins from
  511. # midnight, so 1 = today, 2 = yesterday, etc. 0 = check disabled.
  512. #dbox_rotate_days = 0
  513.  
  514. ##
  515. ## IMAP specific settings
  516. ##
  517.  
  518. protocol imap {
  519. # Login executable location.
  520. #login_executable = /usr/libexec/dovecot/imap-login
  521.  
  522. # IMAP executable location. Changing this allows you to execute other
  523. # binaries before the imap process is executed.
  524. #
  525. # This would write rawlogs into ~/dovecot.rawlog/ directory:
  526. # mail_executable = /usr/libexec/dovecot/rawlog /usr/libexec/dovecot/imap
  527. #
  528. # This would attach gdb into the imap process and write backtraces into
  529. # /tmp/gdbhelper.* files:
  530. # mail_executable = /usr/libexec/dovecot/gdbhelper /usr/libexec/dovecot/imap
  531. #
  532. #mail_executable = /usr/libexec/dovecot/imap
  533.  
  534. # Maximum IMAP command line length in bytes. Some clients generate very long
  535. # command lines with huge mailboxes, so you may need to raise this if you get
  536. # "Too long argument" or "IMAP command line too large" errors often.
  537. #imap_max_line_length = 65536
  538.  
  539. # Support for dynamically loadable plugins. mail_plugins is a space separated
  540. # list of plugins to load.
  541. #mail_plugins =
  542. #mail_plugin_dir = /usr/lib/dovecot/imap
  543.  
  544. # Send IMAP capabilities in greeting message. This makes it unnecessary for
  545. # clients to request it with CAPABILITY command, so it saves one round-trip.
  546. # Many clients however don't understand it and ask the CAPABILITY anyway.
  547. #login_greeting_capability = no
  548.  
  549.  
  550. # Override the IMAP CAPABILITY response.
  551. #imap_capability =
  552.  
  553. # Workarounds for various client bugs:
  554. # delay-newmail:
  555. # Send EXISTS/RECENT new mail notifications only when replying to NOOP
  556. # and CHECK commands. Some clients ignore them otherwise, for example OSX
  557. # Mail (<v2.1). Outlook Express breaks more badly though, without this it
  558. # may show user "Message no longer in server" errors. Note that OE6 still
  559. # breaks even with this workaround if synchronization is set to
  560. # "Headers Only".
  561. # outlook-idle:
  562. # Outlook and Outlook Express never abort IDLE command, so if no mail
  563. # arrives in half a hour, Dovecot closes the connection. This is still
  564. # fine, except Outlook doesn't connect back so you don't see if new mail
  565. # arrives.
  566. # netscape-eoh:
  567. # Netscape 4.x breaks if message headers don't end with the empty "end of
  568. # headers" line. Normally all messages have this, but setting this
  569. # workaround makes sure that Netscape never breaks by adding the line if
  570. # it doesn't exist. This is done only for FETCH BODY[HEADER.FIELDS..]
  571. # commands. Note that RFC says this shouldn't be done.
  572. # tb-extra-mailbox-sep:
  573. # With mbox storage a mailbox can contain either mails or submailboxes,
  574. # but not both. Thunderbird separates these two by forcing server to
  575. # accept '/' suffix in mailbox names in subscriptions list.
  576. # The list is space-separated.
  577. #imap_client_workarounds = outlook-idle
  578. }
  579.  
  580. ##
  581. ## POP3 specific settings
  582. ##
  583.  
  584. protocol pop3 {
  585. # Login executable location.
  586. #login_executable = /usr/libexec/dovecot/pop3-login
  587.  
  588. # POP3 executable location. See IMAP's mail_executable above for examples
  589. # how this could be changed.
  590.  
  591. #mail_executable = /usr/libexec/dovecot/pop3
  592.  
  593. # Don't try to set mails non-recent or seen with POP3 sessions. This is
  594. # mostly intended to reduce disk I/O. With maildir it doesn't move files
  595. # from new/ to cur/, with mbox it doesn't write Status-header.
  596. #pop3_no_flag_updates = no
  597.  
  598. # Support LAST command which exists in old POP3 specs, but has been removed
  599. # from new ones. Some clients still wish to use this though. Enabling this
  600. # makes RSET command clear all \Seen flags from messages.
  601. #pop3_enable_last = no
  602.  
  603. # If mail has X-UIDL header, use it as the mail's UIDL.
  604. #pop3_reuse_xuidl = no
  605.  
  606. # Keep the mailbox locked for the entire POP3 session.
  607. #pop3_lock_session = no
  608.  
  609. # POP3 UIDL (unique mail identifier) format to use. You can use following
  610. # variables:
  611. #
  612. # %v - Mailbox's IMAP UIDVALIDITY
  613. # %u - Mail's IMAP UID
  614. # %m - MD5 sum of the mailbox headers in hex (mbox only)
  615. # %f - filename (maildir only)
  616. #
  617. # If you want UIDL compatibility with other POP3 servers, use:
  618. # UW's ipop3d : %08Xv%08Xu
  619. # Courier version 0 : %f
  620. # Courier version 1 : %u
  621. # Courier version 2 : %v-%u
  622. # Cyrus (<= 2.1.3) : %u
  623. # Cyrus (>= 2.1.4) : %v.%u
  624. # Older Dovecots : %v.%u
  625. # tpop3d : %Mf
  626. #
  627. # Note that Outlook 2003 seems to have problems with %v.%u format which was
  628. # Dovecot's default, so if you're building a new server it would be a good
  629. # idea to change this. %08Xu%08Xv should be pretty fail-safe.
  630. #
  631. # NOTE: Nowadays this is required to be set explicitly, since the old
  632.  
  633. # default was bad but it couldn't be changed without breaking existing
  634. # installations. %08Xu%08Xv will be the new default, so use it for new
  635. # installations.
  636. #
  637. #pop3_uidl_format = %08Xu%08Xv
  638.  
  639. # POP3 logout format string:
  640. # %t - number of TOP commands
  641. # %p - number of bytes sent to client as a result of TOP command
  642. # %r - number of RETR commands
  643. # %b - number of bytes sent to client as a result of RETR command
  644. # %d - number of deleted messages
  645. # %m - number of messages (before deletion)
  646. # %s - mailbox size in bytes (before deletion)
  647. #pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
  648.  
  649. # Support for dynamically loadable plugins. mail_plugins is a space separated
  650. # list of plugins to load.
  651. #mail_plugins =
  652. #mail_plugin_dir = /usr/lib/dovecot/pop3
  653.  
  654. # Workarounds for various client bugs:
  655. # outlook-no-nuls:
  656. # Outlook and Outlook Express hang if mails contain NUL characters.
  657. # This setting replaces them with 0x80 character.
  658. # oe-ns-eoh:
  659. # Outlook Express and Netscape Mail breaks if end of headers-line is
  660. # missing. This option simply sends it if it's missing.
  661. # The list is space-separated.
  662. #pop3_client_workarounds =
  663. }
  664.  
  665. ##
  666. ## LDA specific settings
  667. ##
  668.  
  669. protocol lda {
  670. # Address to use when sending rejection mails.
  671. postmaster_address = postmaster@example.com
  672.  
  673. # Hostname to use in various parts of sent mails, eg. in Message-Id.
  674.  
  675. # Default is the system's real hostname.
  676. #hostname =
  677.  
  678. # Support for dynamically loadable plugins. mail_plugins is a space separated
  679. # list of plugins to load.
  680. #mail_plugins =
  681. #mail_plugin_dir = /usr/lib/dovecot/lda
  682.  
  683. # Binary to use for sending mails.
  684. #sendmail_path = /usr/lib/sendmail
  685.  
  686. # UNIX socket path to master authentication server to find users.
  687. #auth_socket_path = /var/run/dovecot/auth-master
  688. }
  689.  
  690. ##
  691. ## Authentication processes
  692. ##
  693.  
  694. # Executable location
  695. #auth_executable = /usr/libexec/dovecot/dovecot-auth
  696.  
  697. # Set max. process size in megabytes.
  698. #auth_process_size = 256
  699.  
  700. # Authentication cache size in kilobytes. 0 means it's disabled.
  701. # Note that bsdauth, PAM and vpopmail require cache_key to be set for caching
  702. # to be used.
  703. #auth_cache_size = 0
  704. # Time to live in seconds for cached data. After this many seconds the cached
  705. # record is no longer used, *except* if the main database lookup returns
  706. # internal failure. We also try to handle password changes automatically: If
  707. # user's previous authentication was successful, but this one wasn't, the
  708. # cache isn't used. For now this works only with plaintext authentication.
  709. #auth_cache_ttl = 3600
  710.  
  711. # Space separated list of realms for SASL authentication mechanisms that need
  712. # them. You can leave it empty if you don't want to support multiple realms.
  713. # Many clients simply use the first one listed here, so keep the default realm
  714. # first.
  715. #auth_realms =
  716.  
  717.  
  718. # Default realm/domain to use if none was specified. This is used for both
  719. # SASL realms and appending @domain to username in plaintext logins.
  720. #auth_default_realm =
  721.  
  722. # List of allowed characters in username. If the user-given username contains
  723. # a character not listed in here, the login automatically fails. This is just
  724. # an extra check to make sure user can't exploit any potential quote escaping
  725. # vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
  726. # set this value to empty.
  727. #auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
  728.  
  729. # Username character translations before it's looked up from databases. The
  730. # value contains series of from -> to characters. For example "#@/@" means
  731. # that '#' and '/' characters are translated to '@'.
  732. #auth_username_translation =
  733.  
  734. # Username formatting before it's looked up from databases. You can use
  735. # the standard variables here, eg. %Lu would lowercase the username, %n would
  736. # drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
  737. # "-AT-". This translation is done after auth_username_translation changes.
  738. #auth_username_format =
  739.  
  740. # If you want to allow master users to log in by specifying the master
  741. # username within the normal username string (ie. not using SASL mechanism's
  742. # support for it), you can specify the separator character here. The format
  743. # is then <username><separator><master username>. UW-IMAP uses "*" as the
  744. # separator, so that could be a good choice.
  745. #auth_master_user_separator =
  746.  
  747. # Username to use for users logging in with ANONYMOUS SASL mechanism
  748. #auth_anonymous_username = anonymous
  749.  
  750. # More verbose logging. Useful for figuring out why authentication isn't
  751. # working.
  752. #auth_verbose = no
  753.  
  754. # Even more verbose logging for debugging purposes. Shows for example SQL
  755. # queries.
  756. #auth_debug = no
  757.  
  758.  
  759. # In case of password mismatches, log the passwords and used scheme so the
  760. # problem can be debugged. Requires auth_debug=yes to be set.
  761. #auth_debug_passwords = no
  762.  
  763. # Maximum number of dovecot-auth worker processes. They're used to execute
  764. # blocking passdb and userdb queries (eg. MySQL and PAM). They're
  765. # automatically created and destroyed as needed.
  766. #auth_worker_max_count = 30
  767.  
  768. # Host name to use in GSSAPI principal names. The default is to use the
  769. # name returned by gethostname().
  770. #auth_gssapi_hostname =
  771.  
  772. # Kerberos keytab to use for the GSSAPI mechanism. Will use the system
  773. # default (usually /etc/krb5.keytab) if not specified.
  774. #auth_krb5_keytab =
  775.  
  776. auth default {
  777. # Space separated list of wanted authentication mechanisms:
  778. # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
  779. # NOTE: See also disable_plaintext_auth setting.
  780. mechanisms = plain
  781.  
  782. #
  783. # Password database is used to verify user's password (and nothing more).
  784. # You can have multiple passdbs and userdbs. This is useful if you want to
  785. # allow both system users (/etc/passwd) and virtual users to login without
  786. # duplicating the system users into virtual database.
  787. #
  788. # <doc/wiki/PasswordDatabase.txt>
  789. #
  790. # By adding master=yes setting inside a passdb you make the passdb a list
  791. # of "master users", who can log in as anyone else. Unless you're using PAM,
  792. # you probably still want the destination user to be looked up from passdb
  793. # that it really exists. This can be done by adding pass=yes setting to the
  794. # master passdb. <doc/wiki/Authentication.MasterUsers.txt>
  795.  
  796. # Users can be temporarily disabled by adding a passdb with deny=yes.
  797. # If the user is found from that database, authentication will fail.
  798. # The deny passdb should always be specified before others, so it gets
  799. # checked first. Here's an example:
  800.  
  801.  
  802. #passdb passwd-file {
  803. # File contains a list of usernames, one per line
  804. #args = /etc/dovecot.deny
  805. #deny = yes
  806. #}
  807.  
  808. # PAM authentication. Preferred nowadays by most systems.
  809. # Note that PAM can only be used to verify if user's password is correct,
  810. # so it can't be used as userdb. If you don't want to use a separate user
  811. # database (passwd usually), you can use static userdb.
  812. # REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM
  813. # authentication to actually work. <doc/wiki/PasswordDatabase.PAM.txt>
  814. passdb pam {
  815. # [blocking=yes] [session=yes] [setcred=yes]
  816. # [cache_key=<key>] [<service name>]
  817. #
  818. # By default a new process is forked from dovecot-auth for each PAM lookup.
  819. # Setting blocking=yes uses the alternative way: dovecot-auth worker
  820. # processes do the PAM lookups.
  821. #
  822. # session=yes makes Dovecot open and immediately close PAM session. Some
  823. # PAM plugins need this to work, such as pam_mkhomedir.
  824. #
  825. # setcred=yes makes Dovecot establish PAM credentials if some PAM plugins
  826. # need that. They aren't ever deleted though, so this isn't enabled by
  827. # default.
  828. #
  829. # cache_key can be used to enable authentication caching for PAM
  830. # (auth_cache_size also needs to be set). It isn't enabled by default
  831. # because PAM modules can do all kinds of checks besides checking password,
  832. # such as checking IP address. Dovecot can't know about these checks
  833. # without some help. cache_key is simply a list of variables (see
  834. # doc/wiki/Variables.txt) which must match for the cached data to be used.
  835. # Here are some examples:
  836. # %u - Username must match. Probably sufficient for most uses.
  837. # %u%r - Username and remote IP address must match.
  838. # %u%s - Username and service (ie. IMAP, POP3) must match.
  839. #
  840. # If service name is "*", it means the authenticating service name
  841. # is used, eg. pop3 or imap (/etc/pam.d/pop3, /etc/pam.d/imap).
  842.  
  843. #
  844. # Some examples:
  845. # args = session=yes *
  846. # args = cache_key=%u dovecot
  847. #args = dovecot
  848. }
  849.  
  850. # System users (NSS, /etc/passwd, or similiar)
  851. # In many systems nowadays this uses Name Service Switch, which is
  852. # configured in /etc/nsswitch.conf. <doc/wiki/AuthDatabase.Passwd.txt>
  853. #passdb passwd {
  854. # [blocking=yes] - See userdb passwd for explanation
  855. #args =
  856. #}
  857.  
  858. # Shadow passwords for system users (NSS, /etc/shadow or similiar).
  859. # Deprecated by PAM nowadays.
  860. # <doc/wiki/PasswordDatabase.Shadow.txt>
  861. #passdb shadow {
  862. # [blocking=yes] - See userdb passwd for explanation
  863. #args =
  864. #}
  865.  
  866. # PAM-like authentication for OpenBSD.
  867. # <doc/wiki/PasswordDatabase.BSDAuth.txt>
  868. #passdb bsdauth {
  869. # [cache_key=<key>] - See cache_key in PAM for explanation.
  870. #args =
  871. #}
  872.  
  873. # passwd-like file with specified location
  874. # <doc/wiki/AuthDatabase.PasswdFile.txt>
  875. #passdb passwd-file {
  876. # Path for passwd-file
  877. #args =
  878. #}
  879.  
  880. # checkpassword executable authentication
  881. # NOTE: You will probably want to use "userdb prefetch" with this.
  882. # <doc/wiki/PasswordDatabase.CheckPassword.txt>
  883. #passdb checkpassword {
  884.  
  885. # Path for checkpassword binary
  886. #args =
  887. #}
  888.  
  889. # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  890. #passdb sql {
  891. # Path for SQL configuration file, see doc/dovecot-sql-example.conf
  892. #args =
  893. #}
  894.  
  895. # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  896. #passdb ldap {
  897. # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
  898. #args =
  899. #}
  900.  
  901. # vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
  902. #passdb vpopmail {
  903. # [cache_key=<key>] - See cache_key in PAM for explanation.
  904. #args =
  905. #}
  906.  
  907. #
  908. # User database specifies where mails are located and what user/group IDs
  909. # own them. For single-UID configuration use "static".
  910. #
  911. # <doc/wiki/UserDatabase.txt>
  912. #
  913.  
  914. # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this
  915. # uses Name Service Switch, which is configured in /etc/nsswitch.conf.
  916. # <doc/wiki/AuthDatabase.Passwd.txt>
  917. userdb passwd {
  918. # [blocking=yes] - By default the lookups are done in the main dovecot-auth
  919. # process. This setting causes the lookups to be done in auth worker
  920. # proceses. Useful with remote NSS lookups that may block.
  921. # NOTE: Be sure to use this setting with nss_ldap or users might get
  922. # logged in as each others!
  923. #args =
  924. }
  925.  
  926.  
  927. # passwd-like file with specified location
  928. # <doc/wiki/AuthDatabase.PasswdFile.txt>
  929. #userdb passwd-file {
  930. # Path for passwd-file
  931. #args =
  932. #}
  933.  
  934. # static settings generated from template <doc/wiki/UserDatabase.Static.txt>
  935. #userdb static {
  936. # Template for the fields. Can return anything a userdb could normally
  937. # return. For example:
  938. #
  939. # args = uid=500 gid=500 home=/var/mail/%u
  940. #
  941. # If you use deliver, it needs to look up users only from the userdb. This
  942. # of course doesn't work with static because there is no list of users.
  943. # Normally static userdb handles this by doing a passdb lookup. This works
  944. # with most passdbs, with PAM being the most notable exception. If you do
  945. # the user verification another way, you can add allow_all_users=yes to
  946. # the args in which case the passdb lookup is skipped.
  947. #
  948. #args =
  949. #}
  950.  
  951. # SQL database <doc/wiki/AuthDatabase.SQL.txt>
  952. #userdb sql {
  953. # Path for SQL configuration file, see doc/dovecot-sql-example.conf
  954. #args =
  955. #}
  956.  
  957. # LDAP database <doc/wiki/AuthDatabase.LDAP.txt>
  958. #userdb ldap {
  959. # Path for LDAP configuration file, see doc/dovecot-ldap-example.conf
  960. #args =
  961. #}
  962.  
  963. # vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
  964. #userdb vpopmail {
  965. #}
  966.  
  967. # "prefetch" user database means that the passdb already provided the
  968.  
  969. # needed information and there's no need to do a separate userdb lookup.
  970. # This can be made to work with SQL and LDAP databases, see their example
  971. # configuration files for more information how to do it.
  972. # <doc/wiki/UserDatabase.Prefetch.txt>
  973. #userdb prefetch {
  974. #}
  975.  
  976. # User to use for the process. This user needs access to only user and
  977. # password databases, nothing else. Only shadow and pam authentication
  978. # requires roots, so use something else if possible. Note that passwd
  979. # authentication with BSDs internally accesses shadow files, which also
  980. # requires roots. Note that this user is NOT used to access mails.
  981. # That user is specified by userdb above.
  982. user = root
  983.  
  984. # Directory where to chroot the process. Most authentication backends don't
  985. # work if this is set, and there's no point chrooting if auth_user is root.
  986. # Note that valid_chroot_dirs isn't needed to use this setting.
  987. #chroot =
  988.  
  989. # Number of authentication processes to create
  990. #count = 1
  991.  
  992. # Require a valid SSL client certificate or the authentication fails.
  993. #ssl_require_client_cert = no
  994.  
  995. # Take the username from client's SSL certificate, using
  996. # X509_NAME_get_text_by_NID() which returns the subject's DN's
  997. # CommonName.
  998. #ssl_username_from_cert = no
  999.  
  1000. # It's possible to export the authentication interface to other programs:
  1001. #socket listen {
  1002. #master {
  1003. # Master socket provides access to userdb information. It's typically
  1004. # used to give Dovecot's local delivery agent access to userdb so it
  1005. # can find mailbox locations.
  1006. #path = /var/run/dovecot/auth-master
  1007. #mode = 0600
  1008. # Default user/group is the one who started dovecot-auth (root)
  1009. #user =
  1010.  
  1011. #group =
  1012. #}
  1013. #client {
  1014. # The client socket is generally safe to export to everyone. Typical use
  1015. # is to export it to your SMTP server so it can do SMTP AUTH lookups
  1016. # using it.
  1017. #path = /var/run/dovecot/auth-client
  1018. #mode = 0660
  1019. #}
  1020. #}
  1021. }
  1022.  
  1023. # If you wish to use another authentication server than dovecot-auth, you can
  1024. # use connect sockets. They are assumed to be already running, Dovecot's master
  1025. # process only tries to connect to them. They don't need any other settings
  1026. # than the path for the master socket, as the configuration is done elsewhere.
  1027. # Note that the client sockets must exist in the login_dir.
  1028. #auth external {
  1029. # socket connect {
  1030. # master {
  1031. # path = /var/run/dovecot/auth-master
  1032. # }
  1033. # }
  1034. #}
  1035.  
  1036. ##
  1037. ## Dictionary server settings
  1038. ##
  1039.  
  1040. # Dictionary can be used by some plugins to store key=value lists.
  1041. # Currently this is only used by dict quota backend. The dictionary can be
  1042. # used either directly or though a dictionary server. The following dict block
  1043. # maps dictionary names to URIs when the server is used. These can then be
  1044. # referenced using URIs in format "proxy:<name>".
  1045.  
  1046. dict {
  1047. #quota = mysql:/etc/dovecot-dict-quota.conf
  1048. }
  1049.  
  1050. ##
  1051. ## Plugin settings
  1052.  
  1053. ##
  1054.  
  1055. plugin {
  1056. # Here you can give some extra environment variables to mail processes.
  1057. # This is mostly meant for passing parameters to plugins. %variable
  1058. # expansion is done for all values.
  1059.  
  1060. # Quota plugin. Multiple backends are supported:
  1061. # dirsize: Find and sum all the files found from mail directory.
  1062. # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
  1063. # dict: Keep quota stored in dictionary (eg. SQL)
  1064. # maildir: Maildir++ quota
  1065. # fs: Read-only support for filesystem quota
  1066. #quota = maildir
  1067.  
  1068. # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir
  1069. # directory. You can also optionally give a global ACL directory path where
  1070. # ACLs are applied to all users' mailboxes. The global ACL directory contains
  1071. # one file for each mailbox, eg. INBOX or sub.mailbox.
  1072. #acl = vfile:/etc/dovecot-acls
  1073.  
  1074. # Convert plugin. If set, specifies the source storage path which is
  1075. # converted to destination storage (mail_location) when the user logs in.
  1076. # The existing mail directory is renamed to <dir>-converted.
  1077. #convert_mail = mbox:%h/mail
  1078. # Skip mailboxes which we can't open successfully instead of aborting.
  1079. #convert_skip_broken_mailboxes = no
  1080.  
  1081. # Trash plugin. When saving a message would make user go over quota, this
  1082. # plugin automatically deletes the oldest mails from configured mailboxes
  1083. # until the message can be saved within quota limits. The configuration file
  1084. # is a text file where each line is in format: <priority> <mailbox name>
  1085. # Mails are first deleted in lowest -> highest priority number order
  1086. #trash = /etc/dovecot-trash.conf
  1087.  
  1088. # Lazy expunge plugin. Currently works only with maildirs. When a user
  1089. # expunges mails, the mails are moved to a mailbox in another namespace
  1090. # (1st). When a mailbox is deleted, the mailbox is moved to another namespace
  1091. # (2nd) as well. Also if the deleted mailbox had any expunged messages,
  1092. # they're moved to a 3rd namespace. The mails won't be counted in quota,
  1093. # and they're not deleted automatically (use a cronjob or something).
  1094.  
  1095. # they're moved to a 3rd namespace. The mails won't be counted in quota,
  1096. # and they're not deleted automatically (use a cronjob or something).
  1097. #lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
  1098. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement