Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 54.14 KB | None | 0 0
  1. ## Dovecot configuration file
  2.  
  3. # NOTICE FOR CPANEL SYSTEMS
  4. # On cPanel servers this file is generated by combining a
  5. # template at /var/cpanel/templates/dovecot2.3/main.default
  6. # and a datastore at /var/cpanel/conf/dovecot/main
  7. #
  8. # The template may be customized by making a copy of it at
  9. # /var/cpanel/templates/dovecot2.3/main.local
  10. # similar to the way in which httpd.conf can be customized
  11. #
  12. # Direct edits of the rendered dovecot.conf file will not
  13. # be preserved when dovecot is updated.  Use the
  14. # "Mailserver Configuration" interface in WebHostManager instead.
  15.  
  16.  
  17. # If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
  18.  
  19. # "doveconf -n" command gives a clean output of the changed settings. Use it
  20. # instead of copy&pasting files when posting to the Dovecot mailing list.
  21.  
  22. # '#' character and everything after it is treated as comments. Extra spaces
  23. # and tabs are ignored. If you want to use either of these explicitly, put the
  24. # value inside quotes, eg.: key = "# char and trailing whitespace  "
  25.  
  26. # Most (but not all) settings can be overridden by different protocols and/or
  27. # source/destination IPs by placing the settings inside sections, for example:
  28. # protocol imap { }, local 127.0.0.1 { }, remote 10.0.0.0/8 { }
  29.  
  30. # Default values are shown for each setting, it's not required to uncomment
  31. # those. These are exceptions to this though: No sections (e.g. namespace {})
  32. # or plugin settings are added by default, they're listed only as examples.
  33. # Paths are also just examples with the real defaults being based on configure
  34. # options. The paths listed here are for configure --prefix=/usr
  35. # --sysconfdir=/etc --localstatedir=/var
  36.  
  37. # Base directory where to store runtime data.
  38. #base_dir = /var/run/dovecot
  39.  
  40. # Protocols we want to be serving: imap pop3
  41. # If you only want to use dovecot-auth, you can set this to "none".
  42. protocols = lmtp imap pop3
  43.  
  44. # A comma separated list of IPs or hosts where to listen in for connections.
  45. # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
  46. # If you want to specify non-default ports or anything more complex,
  47. # edit conf.d/master.conf.
  48. #listen = *, ::
  49.  
  50. # Should all IMAP and POP3 processes be killed when Dovecot master process
  51. # shuts down. Setting this to "no" means that Dovecot can be upgraded without
  52. # forcing existing client connections to close (although that could also be
  53. # a problem if the upgrade is eg. because of a security fix). This however
  54. # means that after master process has died, the client processes can't write
  55. # to log files anymore.
  56. #shutdown_clients = yes
  57.  
  58.  
  59. # FTS support
  60. !include_try /etc/dovecot/fts.conf
  61.  
  62.  
  63. ##
  64. ## SSL settings
  65. ##
  66.  
  67. # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
  68. #ssl = yes
  69.  
  70. # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
  71. # dropping root privileges, so keep the key file unreadable by anyone but
  72. # root. Included doc/mkcert.sh can be used to easily generate self-signed
  73. # certificate, just make sure to update the domains in dovecot-openssl.cnf
  74. ssl_cert = </etc/dovecot/ssl/dovecot.crt
  75.  
  76. ssl_key = </etc/dovecot/ssl/dovecot.key
  77.  
  78. # If key file is password protected, give the password here. Alternatively
  79. # give it when starting dovecot with -p parameter.
  80. #ssl_key_password =
  81.  
  82. # PEM encoded trusted certificate authority. Set this only if you intend to use
  83. # ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
  84. # followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
  85. #ssl_ca =
  86.  
  87. # Request client to send a certificate. If you also want to require it, set
  88. # auth_ssl_require_client_cert=yes in auth section.
  89. #ssl_verify_client_cert = no
  90.  
  91. # Which field from certificate to use for username. commonName and
  92. # x500UniqueIdentifier are the usual choices. You'll also need to set
  93. # auth_ssl_username_from_cert=yes.
  94. #ssl_cert_username_field = commonName
  95.  
  96. # SSL DH parameters
  97. # Generate new params with `openssl dhparam -out /etc/dovecot/dh.pem 4096`
  98. # Or migrate from old ssl-parameters.dat file with the command dovecot
  99. # gives on startup when ssl_dh is unset.
  100. ssl_dh = </etc/dovecot/dh.pem
  101.  
  102. # Minimum SSL protocol version to use. Potentially recognized values are SSLv3,
  103. # TLSv1, TLSv1.1, and TLSv1.2, depending on the OpenSSL version used.
  104. ssl_min_protocol = TLSv1.2
  105.  
  106. # SSL ciphers to use, the default is:
  107. #ssl_cipher_list = ALL:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH
  108. # To disable non-EC DH, use:
  109. #ssl_cipher_list = ALL:!DH:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH
  110. ssl_cipher_list = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
  111.  
  112. # Colon separated list of elliptic curves to use. Empty value (the default)
  113. # means use the defaults from the SSL library. P-521:P-384:P-256 would be an
  114. # example of a valid value.
  115. #ssl_curve_list =
  116.  
  117. # Prefer the server's order of ciphers over client's.
  118. #ssl_prefer_server_ciphers = no
  119.  
  120. # SSL crypto device to use, for valid values run "openssl engine"
  121. #ssl_crypto_device =
  122.  
  123. # SSL extra options. Currently supported options are:
  124. #   compression - Enable compression.
  125. #   no_ticket - Disable SSL session tickets.
  126. #ssl_options =
  127.  
  128. # Show protocol level SSL errors.
  129. #verbose_ssl = no
  130.  
  131. # SNI hosts
  132. !include_try /etc/dovecot/sni.conf
  133.  
  134. ##
  135. ## Login processes
  136. ##
  137.  
  138. # Name of this instance. In multi-instance setup doveadm and other commands
  139. # can use -i <instance_name> to select which instance is used (an alternative
  140. # to -c <config_path>). The instance name is also added to Dovecot processes
  141. # in ps output.
  142. #instance_name = dovecot
  143.  
  144. # Greeting message for clients.
  145. #login_greeting = Dovecot ready.
  146.  
  147. # Space separated list of trusted network ranges. Connections from these
  148. # IPs are allowed to override their IP addresses and ports (for logging and
  149. # for authentication checks). disable_plaintext_auth is also ignored for
  150. # these networks. Typically you'd specify your IMAP proxy servers here.
  151. #login_trusted_networks =
  152.  
  153. # Space separated list of login access check sockets (e.g. tcpwrap)
  154. #login_access_sockets =
  155.  
  156. # With proxy_maybe=yes if proxy destination matches any of these IPs, don't do
  157. # proxying. This isn't necessary normally, but may be useful if the destination
  158. # IP is e.g. a load balancer's IP.
  159. #auth_proxy_self =
  160.  
  161. ##
  162. ## Mailbox locations and namespaces
  163. ##
  164.  
  165. # Location for users' mailboxes. The default is empty, which means that Dovecot
  166. # tries to find the mailboxes automatically. This won't work if the user
  167. # doesn't yet have any mail, so you should explicitly tell Dovecot the full
  168. # location.
  169. #
  170. # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
  171. # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
  172. # kept. This is called the "root mail directory", and it must be the first
  173. # path given in the mail_location setting.
  174. #
  175. # There are a few special variables you can use, eg.:
  176. #
  177. #   %u - username
  178. #   %n - user part in user@domain, same as %u if there's no domain
  179. #   %d - domain part in user@domain, empty if there's no domain
  180. #   %h - home directory
  181. #
  182. # See doc/wiki/Variables.txt for full list. Some examples:
  183. #
  184. #   mail_location = maildir:~/Maildir
  185. #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
  186. #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
  187. #
  188. # <doc/wiki/MailLocation.txt>
  189. #
  190.  
  191. #mail_location =
  192.  
  193. namespace inbox {
  194.    type = private
  195.  
  196.    # Hierarchy separator to use. You should use the same separator for all
  197.    # namespaces or some clients get confused. '/' is usually a good one.
  198.    # The default however depends on the underlying mail storage format.
  199.    separator = .
  200.  
  201.    # Prefix required to access this namespace. This needs to be different for
  202.    # all namespaces. For example "Public/".
  203.    prefix = INBOX.
  204.  
  205.    # Physical location of the mailbox. This is in same format as
  206.    # mail_location, which is also the default for it.
  207.    #location =
  208.  
  209.    # There can be only one INBOX, and this setting defines which namespace
  210.    # has it.
  211.    inbox = yes
  212.  
  213.    # If namespace is hidden, it's not advertised to clients via NAMESPACE
  214.    # extension. You'll most likely also want to set list=no. This is mostly
  215.    # useful when converting from another server with different namespaces which
  216.    # you want to deprecate but still keep working. For example you can create
  217.    # hidden namespaces with prefixes "~/mail/", "~%u/mail/" and "mail/".
  218.    #hidden = yes
  219.  
  220.    # Show the mailboxes under this namespace with LIST command. This makes the
  221.    # namespace visible for clients that don't support NAMESPACE extension.
  222.    # "children" value lists child mailboxes, but hides the namespace prefix.
  223.    #list = yes
  224.  
  225.    # Namespace handles its own subscriptions. If set to "no", the parent
  226.    # namespace handles them (empty prefix should always have this as "yes")
  227.    #subscriptions = yes
  228.    #subscriptions = yes
  229.  
  230.   mailbox Drafts {
  231.     special_use = \Drafts
  232.     auto = subscribe
  233.   }
  234.  
  235.   mailbox spam {
  236.     special_use = \Junk
  237.     auto = subscribe
  238.   }
  239.  
  240.   mailbox Trash {
  241.     special_use = \Trash
  242.     auto = subscribe
  243.   }
  244.  
  245.   mailbox Sent {
  246.     special_use = \Sent
  247.     auto = subscribe
  248.   }
  249.  
  250.   mailbox "Sent Messages" {
  251.     special_use = \Sent
  252.     auto = no
  253.   }
  254.  
  255.   mailbox Archive {
  256.     special_use = \Archive
  257.     auto = create
  258.   }
  259.  
  260.   mailbox "Archives" {
  261.     special_use = \Archive
  262.     auto = no
  263.   }
  264. }
  265.  
  266. # Example shared namespace configuration
  267. #namespace {
  268.   #type = shared
  269.   #separator = /
  270.  
  271.   # Mailboxes are visible under "shared/user@domain/"
  272.   # %%n, %%d and %%u are expanded to the destination user.
  273.   #prefix = shared/%%u/
  274.  
  275.   # Mail location for other users' mailboxes. Note that %variables and ~/
  276.   # expands to the logged in user's data. %%n, %%d, %%u and %%h expand to the
  277.   # destination user's data.
  278.   #location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  279.  
  280.   # Use the default namespace for saving subscriptions.
  281.   #subscriptions = no
  282.  
  283.   # List the shared/ namespace only if there are visible shared mailboxes.
  284.   #list = children
  285. #}
  286. # Should shared INBOX be visible as "shared/user" or "shared/user/INBOX"?
  287. #mail_shared_explicit_inbox = no
  288.  
  289. # System user and group used to access mails. If you use multiple, userdb
  290. # can override these by returning uid or gid fields. You can use either numbers
  291. # or names. <doc/wiki/UserIds.txt>
  292. #mail_uid =
  293. #mail_gid =
  294.  
  295. # Group to enable temporarily for privileged operations. Currently this is
  296. # used only with INBOX when either its initial creation or dotlocking fails.
  297. # Typically this is set to "mail" to give access to /var/mail.
  298. #mail_privileged_group =
  299.  
  300. # Grant access to these supplementary groups for mail processes. Typically
  301. # these are used to set up access to shared mailboxes. Note that it may be
  302. # dangerous to set these if users can create symlinks (e.g. if "mail" group is
  303. # set here, ln -s /var/mail ~/mail/var could allow a user to delete others'
  304. # mailboxes, or ln -s /secret/shared/box ~/mail/mybox would allow reading it).
  305. #mail_access_groups =
  306.  
  307. # Allow full filesystem access to clients. There's no access checks other than
  308. # what the operating system does for the active UID/GID. It works with both
  309. # maildir and mboxes, allowing you to prefix mailboxes names with eg. /path/
  310. # or ~user/.
  311. #mail_full_filesystem_access = no
  312.  
  313. # Dictionary for key=value mailbox attributes. This is used for example by
  314. # URLAUTH and METADATA extensions.
  315. #mail_attribute_dict =
  316.  
  317. # A comment or note that is associated with the server. This value is
  318. # accessible for authenticated users through the IMAP METADATA server
  319. # entry "/shared/comment".
  320. #mail_server_comment = ""
  321.  
  322. # Indicates a method for contacting the server administrator. According to
  323. # RFC 5464, this value MUST be a URI (e.g., a mailto: or tel: URL), but that
  324. # is currently not enforced. Use for example mailto:admin@example.com. This
  325. # value is accessible for authenticated users through the IMAP METADATA server
  326. # entry "/shared/admin".
  327. #mail_server_admin =
  328.  
  329. ##
  330. ## Mail processes
  331. ##
  332.  
  333. # Don't use mmap() at all. This is required if you store indexes to shared
  334. # filesystems (NFS or clustered filesystem).
  335. #mmap_disable = no
  336.  
  337. # Rely on O_EXCL to work when creating dotlock files. NFS supports O_EXCL
  338. # since version 3, so this should be safe to use nowadays by default.
  339. #dotlock_use_excl = yes
  340.  
  341. # When to use fsync() or fdatasync() calls:
  342. #   optimized (default): Whenever necessary to avoid losing important data
  343. #   always: Useful with e.g. NFS when write()s are delayed
  344. #   never: Never use it (best performance, but crashes can lose data)
  345. #mail_fsync = optimized
  346.  
  347. # Mail storage exists in NFS. Set this to yes to make Dovecot flush NFS caches
  348. # whenever needed. If you're using only a single mail server this isn't needed.
  349. #mail_nfs_storage = no
  350.  
  351. # Mail index files also exist in NFS. Setting this to yes requires
  352. # mmap_disable=yes and fsync_disable=no.
  353. #mail_nfs_index = no
  354.  
  355. # Locking method for index files. Alternatives are fcntl, flock and dotlock.
  356. # Dotlocking uses some tricks which may create more disk I/O than other locking
  357. # methods. NFS users: flock doesn't work, remember to change mmap_disable.
  358. #lock_method = fcntl
  359.  
  360. # Show more verbose process titles (in ps). Currently shows user name and
  361. # IP address. Useful for seeing who are actually using the IMAP processes
  362. # (eg. shared mailboxes or if same uid is used for multiple accounts).
  363. #verbose_proctitle = no
  364.  
  365. # Directory where mails can be temporarily stored. Usually it's used only for
  366. # mails larger than >= 128 kB. It's used by various parts of Dovecot, for
  367. # example LDA/LMTP while delivering large mails or zlib plugin for keeping
  368. # uncompressed mails.
  369. #mail_temp_dir = /tmp
  370.  
  371. # Valid UID range for users, defaults to 500 and above. This is mostly
  372. # to make sure that users can't log in as daemons or other system users.
  373. # Note that denying root logins is hardcoded to dovecot binary and can't
  374. # be done even if first_valid_uid is set to 0.
  375. first_valid_uid = 201
  376. #last_valid_uid = 0
  377.  
  378. # Valid GID range for users, defaults to non-root/wheel. Users having
  379. # non-valid GID as primary group ID aren't allowed to log in. If user
  380. # belongs to supplementary groups with non-valid GIDs, those groups are
  381. # not set.
  382. #first_valid_gid = 1
  383. #last_valid_gid = 0
  384.  
  385. # Maximum allowed length for mail keyword name. It's only forced when trying
  386. # to create new keywords.
  387. #mail_max_keyword_length = 50
  388.  
  389. # ':' separated list of directories under which chrooting is allowed for mail
  390. # processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
  391. # This setting doesn't affect login_chroot, mail_chroot or auth chroot
  392. # settings. If this setting is empty, "/./" in home dirs are ignored.
  393. # WARNING: Never add directories here which local users can modify, that
  394. # may lead to root exploit. Usually this should be done only if you don't
  395. # allow shell access for users. <doc/wiki/Chrooting.txt>
  396. #valid_chroot_dirs =
  397.  
  398. # Default chroot directory for mail processes. This can be overridden for
  399. # specific users in user database by giving /./ in user's home directory
  400. # (eg. /home/./user chroots into /home). Note that usually there is no real
  401. # need to do chrooting, Dovecot doesn't allow users to access files outside
  402. # their mail directory anyway. If your home directories are prefixed with
  403. # the chroot directory, append "/." to mail_chroot. <doc/wiki/Chrooting.txt>
  404. #mail_chroot =
  405.  
  406. # UNIX socket path to master authentication server to find users.
  407. # This is used by imap (for shared users) and lda.
  408. #auth_socket_path = /var/run/dovecot/auth-userdb
  409.  
  410. # Directory where to look up mail plugins.
  411. #mail_plugin_dir = /usr/lib/dovecot
  412.  
  413. # Space separated list of plugins to load for all services. Plugins specific to
  414. # IMAP, LDA, etc. are added to this list in their own .conf files.
  415. # Quota support must be enabled globally for the quota-status
  416. # service to work
  417. mail_plugins = quota quota_clone zlib fts fts_solr
  418.  
  419. ##
  420. ## Mailbox handling optimizations
  421. ##
  422.  
  423. # Mailbox list indexes can be used to optimize IMAP STATUS commands. They are
  424. # also required for IMAP NOTIFY extension to be enabled.
  425. mailbox_list_index = yes
  426.  
  427. # Trust mailbox list index to be up-to-date. This reduces disk I/O at the cost
  428. # of potentially returning out-of-date results after e.g. server crashes.
  429. # The results will be automatically fixed once the folders are opened.
  430. #mailbox_list_index_very_dirty_syncs = yes
  431.  
  432. # Should INBOX be kept up-to-date in the mailbox list index? By default it's
  433. # not, because most of the mailbox accesses will open INBOX anyway.
  434. #mailbox_list_index_include_inbox = no
  435.  
  436. # The minimum number of mails in a mailbox before updates are done to cache
  437. # file. This allows optimizing Dovecot's behavior to do less disk writes at
  438. # the cost of more disk reads.
  439. #mail_cache_min_mail_count = 0
  440.  
  441. # When IDLE command is running, mailbox is checked once in a while to see if
  442. # there are any new mails or other changes. This setting defines the minimum
  443. # time to wait between those checks. Dovecot can also use inotify and
  444. # kqueue to find out immediately when changes occur.
  445. mailbox_idle_check_interval = 30 secs
  446.  
  447. # Save mails with CR+LF instead of plain LF. This makes sending those mails
  448. # take less CPU, especially with sendfile() syscall with Linux and FreeBSD.
  449. # But it also creates a bit more disk I/O which may just make it slower.
  450. # Also note that if other software reads the mboxes/maildirs, they may handle
  451. # the extra CRs wrong and cause problems.
  452. #mail_save_crlf = no
  453.  
  454. # Max number of mails to keep open and prefetch to memory. This only works with
  455. # some mailbox formats and/or operating systems.
  456. mail_prefetch_count = 20
  457.  
  458. # How often to scan for stale temporary files and delete them (0 = never).
  459. # These should exist only after Dovecot dies in the middle of saving mails.
  460. #mail_temp_scan_interval = 1w
  461.  
  462. # How many slow mail accesses sorting can perform before it returns failure.
  463. # With IMAP the reply is: NO [LIMIT] Requested sort would have taken too long.
  464. # The untagged SORT reply is still returned, but it's likely not correct.
  465. #mail_sort_max_read_count = 0
  466.  
  467. protocol !indexer-worker {
  468.   # If folder vsize calculation requires opening more than this many mails from
  469.   # disk (i.e. mail sizes aren't in cache already), return failure and finish
  470.   # the calculation via indexer process. Disabled by default. This setting must
  471.   # be 0 for indexer-worker processes.
  472.   #mail_vsize_bg_after_count = 0
  473. }
  474.  
  475. ##
  476. ## Maildir-specific settings
  477. ##
  478.  
  479. # By default LIST command returns all entries in maildir beginning with a dot.
  480. # Enabling this option makes Dovecot return only entries which are directories.
  481. # This is done by stat()ing each entry, so it causes more disk I/O.
  482. # (For systems setting struct dirent->d_type, this check is free and it's
  483. # done always regardless of this setting)
  484. #maildir_stat_dirs = no
  485.  
  486. # When copying a message, do it with hard links whenever possible. This makes
  487. # the performance much better, and it's unlikely to have any side effects.
  488. maildir_copy_with_hardlinks = yes
  489.  
  490. # Assume Dovecot is the only MUA accessing Maildir: Scan cur/ directory only
  491. # when its mtime changes unexpectedly or when we can't find the mail otherwise.
  492. maildir_very_dirty_syncs = yes
  493.  
  494. # If enabled, Dovecot doesn't use the S=<size> in the Maildir filenames for
  495. # getting the mail's physical size, except when recalculating Maildir++ quota.
  496. # This can be useful in systems where a lot of the Maildir filenames have a
  497. # broken size. The performance hit for enabling this is very small.
  498. maildir_broken_filename_sizes = yes
  499.  
  500. # Always move mails from new/ directory to cur/, even when the \Recent flags
  501. # aren't being reset.
  502. #maildir_empty_new = no
  503.  
  504. ##
  505. ## mdbox-specific settings
  506. ##
  507.  
  508. # Maximum dbox file size until it's rotated.
  509. mdbox_rotate_size = 10M
  510.  
  511. # Maximum dbox file age until it's rotated. Typically in days. Day begins
  512. # from midnight, so 1d = today, 2d = yesterday, etc. 0 = check disabled.
  513.    
  514.  
  515. # When creating new mdbox files, immediately preallocate their size to
  516. # mdbox_rotate_size. This setting currently works only in Linux with some
  517. # filesystems (ext4, xfs).
  518. #mdbox_preallocate_space = no
  519.  
  520. ##
  521. ## IMAP specific settings
  522. ##
  523.  
  524. protocol imap {
  525.  
  526.   # If nothing happens for this long while client is IDLEing, move the connection
  527.   # to imap-hibernate process and close the old imap process. This saves memory,
  528.   # because connections use very little memory in imap-hibernate process. The
  529.   # downside is that recreating the imap process back uses some resources.
  530.   #imap_hibernate_timeout = 0
  531.  
  532.   # Maximum IMAP command line length in bytes. Some clients generate very long
  533.   # command lines with huge mailboxes, so you may need to raise this if you get
  534.   # "Too long argument" or "IMAP command line too large" errors often.
  535.   #imap_max_line_length = 65536
  536.  
  537.   # Maximum number of IMAP connections allowed for a user from each IP address.
  538.   # NOTE: The username is compared case-sensitively.
  539.   mail_max_userip_connections = 20
  540.  
  541.   # Space separated list of plugins to load (default is global mail_plugins).
  542.   mail_plugins = acl quota imap_quota
  543.  
  544.   mail_plugins = $mail_plugins expire
  545.  
  546.   mail_plugins = $mail_plugins zlib imap_zlib quota_clone virtual  fts fts_solr
  547.   #mail_plugin_dir = /usr/lib/dovecot/imap
  548.  
  549.  
  550.   # IMAP logout format string:
  551.   #  %i - total number of bytes read from client
  552.   #  %o - total number of bytes sent to client
  553.   #  %{fetch_hdr_count} - Number of mails with mail header data sent to client
  554.   #  %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client
  555.   #  %{fetch_body_count} - Number of mails with mail body data sent to client
  556.   #  %{fetch_body_bytes} - Number of bytes with mail body data sent to client
  557.   #  %{deleted} - Number of mails where client added \Deleted flag
  558.   #  %{expunged} - Number of mails that client expunged, which does not
  559.   #                include automatically expunged mails
  560.   #  %{autoexpunged} - Number of mails that were automatically expunged after
  561.   #                    client disconnected
  562.   #  %{trashed} - Number of mails that client copied/moved to the
  563.   #               special_use=\Trash mailbox.
  564.   #  %{appended} - Number of mails saved during the session
  565.   imap_logout_format = in=%i, out=%o, bytes=%i/%o
  566.  
  567.   # Override the IMAP CAPABILITY response. If the value begins with '+',
  568.   # add the given capabilities on top of the defaults (e.g. +XFOO XBAR).
  569.   imap_capability = +NAMESPACE
  570.  
  571.   # How many seconds to wait between "OK Still here" notifications when
  572.   # client is IDLEing.
  573.   imap_idle_notify_interval = 24 min
  574.  
  575.   # ID field names and values to send to clients. Using * as the value makes
  576.   # Dovecot use the default value. The following fields have default values
  577.   # currently: name, version, os, os-version, support-url, support-email.
  578.   #imap_id_send =
  579.  
  580.   # ID fields sent by client to log. * means everything.
  581.   #imap_id_log =
  582.  
  583.   # Workarounds for various client bugs:
  584.   #   delay-newmail:
  585.   #     Send EXISTS/RECENT new mail notifications only when replying to NOOP
  586.   #     and CHECK commands. Some clients ignore them otherwise, for example OSX
  587.   #     Mail (<v2.1). Outlook Express breaks more badly though, without this it
  588.   #     may show user "Message no longer in server" errors. Note that OE6 still
  589.   #     breaks even with this workaround if synchronization is set to
  590.   #     "Headers Only".
  591.   #   tb-extra-mailbox-sep:
  592.   #     Thunderbird gets somehow confused with LAYOUT=fs (mbox and dbox) and
  593.   #     adds extra '/' suffixes to mailbox names. This option causes Dovecot to
  594.   #     ignore the extra '/' instead of treating it as invalid mailbox name.
  595.   #   tb-lsub-flags:
  596.   #     Show \Noselect flags for LSUB replies with LAYOUT=fs (e.g. mbox).
  597.   #     This makes Thunderbird realize they aren't selectable and show them
  598.   #     greyed out, instead of only later giving "not selectable" popup error.
  599.   #
  600.   # The list is space-separated.
  601.   #imap_client_workarounds =
  602.  
  603.   # Host allowed in URLAUTH URLs sent by client. "*" allows all.
  604.   #imap_urlauth_host =
  605.  
  606.   # Enable IMAP LITERAL- extension (replaces LITERAL+)
  607.   #imap_literal_minus = no
  608.  
  609.   # What happens when FETCH fails due to some internal error:
  610.   #   disconnect-immediately:
  611.   #     The FETCH is aborted immediately and the IMAP client is disconnected.
  612.   #   disconnect-after:
  613.   #     The FETCH runs for all the requested mails returning as much data as
  614.   #     possible. The client is finally disconnected without a tagged reply.
  615.   #   no-after:
  616.   #     Same as disconnect-after, but tagged NO reply is sent instead of
  617.   #     disconnecting the client. If the client attempts to FETCH the same failed
  618.   #     mail more than once, the client is disconnected. This is to avoid clients
  619.   #     from going into infinite loops trying to FETCH a broken mail.
  620.   #imap_fetch_failure = disconnect-immediately
  621.  
  622.   namespace spam {
  623.       prefix = spam
  624.      separator = .
  625.     location = virtual:/usr/local/cpanel/etc/dovecot/virtual/spam:INDEX=~/mail/virtual/%u/spam
  626.     list = no
  627.     hidden = yes
  628.   }
  629.  
  630.   namespace sent {
  631.       prefix = sent
  632.      separator = .
  633.     location = virtual:/usr/local/cpanel/etc/dovecot/virtual/sent:INDEX=~/mail/virtual/%u/sent
  634.     list = no
  635.     hidden = yes
  636.   }
  637.  
  638.  
  639. }
  640.  
  641.  
  642. ##
  643. ## POP3 specific settings
  644. ##
  645.  
  646. protocol pop3 {
  647.  
  648.   # Don't try to set mails non-recent or seen with POP3 sessions. This is
  649.   # mostly intended to reduce disk I/O. With maildir it doesn't move files
  650.   # from new/ to cur/, with mbox it doesn't write Status-header.
  651.   #pop3_no_flag_updates = no
  652.  
  653.   # Support LAST command which exists in old POP3 specs, but has been removed
  654.   # from new ones. Some clients still wish to use this though. Enabling this
  655.   # makes RSET command clear all \Seen flags from messages.
  656.   #pop3_enable_last = no
  657.  
  658.   # If mail has X-UIDL header, use it as the mail's UIDL.
  659.   #pop3_reuse_xuidl = no
  660.  
  661.   # Allow only one POP3 session to run simultaneously for the same user.
  662.   #pop3_lock_session =
  663.  
  664.   # POP3 UIDL (unique mail identifier) format to use. You can use following
  665.   # variables, along with the variable modifiers described in
  666.   # doc/wiki/Variables.txt (e.g. %Uf for the filename in uppercase)
  667.   #
  668.   #  %v - Mailbox's IMAP UIDVALIDITY
  669.   #  %u - Mail's IMAP UID
  670.   #  %m - MD5 sum of the mailbox headers in hex (mbox only)
  671.   #  %f - filename (maildir only)
  672.   #
  673.   # If you want UIDL compatibility with other POP3 servers, use:
  674.   #  UW's ipop3d         : %08Xv%08Xu
  675.   #  Courier             : %f or %v-%u (both might be used simultaneosly)
  676.   #  Cyrus (<= 2.1.3)    : %u
  677.   #  Cyrus (>= 2.1.4)    : %v.%u
  678.   #  Dovecot v0.99.x     : %v.%u
  679.   #  tpop3d              : %Mf
  680.   #
  681.   # Note that Outlook 2003 seems to have problems with %v.%u format which was
  682.   # Dovecot's default, so if you're building a new server it would be a good
  683.   # idea to change this. %08Xu%08Xv should be pretty fail-safe.
  684.   #
  685.   pop3_uidl_format = UID%u-%v
  686.  
  687.   # Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
  688.   # won't change those UIDLs. Currently this works only with Maildir.
  689.   #pop3_save_uidl = no
  690.  
  691.   # What to do about duplicate UIDLs if they exist?
  692.   #   allow: Show duplicates to clients.
  693.   #   rename: Append a temporary -2, -3, etc. counter after the UIDL.
  694.   #pop3_uidl_duplicates = allow
  695.  
  696.   # This option changes POP3 behavior so that it's not possible to actually
  697.   # delete mails via POP3, only hide them from future POP3 sessions. The mails
  698.   # will still be counted towards user's quota until actually deleted via IMAP.
  699.   # Use e.g. "$POP3Deleted" as the value (it will be visible as IMAP keyword).
  700.   # Make sure you can legally archive mails before enabling this setting.
  701.   #pop3_deleted_flag =
  702.  
  703.   # POP3 requires message sizes to be listed as if they had CR+LF linefeeds.
  704.   # Many POP3 servers violate this by returning the sizes with LF linefeeds,
  705.   # because it's faster to get. When this setting is enabled, Dovecot still
  706.   # tries to do the right thing first, but if that requires opening the
  707.   # message, it fallbacks to the easier (but incorrect) size.
  708.   #pop3_fast_size_lookups = no
  709.  
  710.   # POP3 logout format string:
  711.   #  %i - total number of bytes read from client
  712.   #  %o - total number of bytes sent to client
  713.   #  %t - number of TOP commands
  714.   #  %p - number of bytes sent to client as a result of TOP command
  715.   #  %r - number of RETR commands
  716.   #  %b - number of bytes sent to client as a result of RETR command
  717.   #  %d - number of deleted messages
  718.   #  %{deleted_bytes} - number of bytes in deleted messages
  719.   #  %m - number of messages (before deletion)
  720.   #  %s - mailbox size in bytes (before deletion)
  721.   #  %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
  722.   pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s, bytes=%i/%o
  723.  
  724.   # Maximum number of POP3 connections allowed for a user from each IP address.
  725.   # NOTE: The username is compared case-sensitively.
  726.   mail_max_userip_connections = 3
  727.  
  728.   # Space separated list of plugins to load (default is global mail_plugins).
  729.   mail_plugins = quota
  730.  
  731.   mail_plugins = $mail_plugins expire
  732.  
  733.  
  734.   mail_plugins = $mail_plugins quota quota_clone virtual zlib
  735.  
  736.   #mail_plugin_dir = /usr/lib/dovecot/pop3
  737.  
  738.   # Workarounds for various client bugs:
  739.   #   outlook-no-nuls:
  740.   #     Outlook and Outlook Express hang if mails contain NUL characters.
  741.   #     This setting replaces them with 0x80 character.
  742.   #   oe-ns-eoh:
  743.   #     Outlook Express and Netscape Mail breaks if end of headers-line is
  744.   #     missing. This option simply sends it if it's missing.
  745.   # The list is space-separated.
  746.   #pop3_client_workarounds =
  747.  
  748.   namespace spam {
  749.       prefix = spam
  750.      separator = .
  751.     location = virtual:/usr/local/cpanel/etc/dovecot/virtual/spam:INDEX=~/mail/virtual/%u/spam
  752.     list = no
  753.     hidden = yes
  754.   }
  755.  
  756.   namespace sent {
  757.       prefix = sent
  758.      separator = .
  759.     location = virtual:/usr/local/cpanel/etc/dovecot/virtual/sent:INDEX=~/mail/virtual/%u/sent
  760.     list = no
  761.     hidden = yes
  762.   }
  763.  
  764.  
  765. }
  766.  
  767. ##
  768. ## LMTP specific settings
  769. ##
  770.  
  771. protocol lmtp {
  772.     quota_full_tempfail = no
  773.     # Address to use when sending rejection mails.
  774.     # Default is postmaster@%d. %d expands to recipient domain.
  775.     postmaster_address = root
  776.  
  777.     mail_plugins = quota quota_clone zlib
  778. }
  779.  
  780. lmtp_save_to_detail_mailbox = yes
  781. lmtp_user_concurrency_limit = 4
  782.  
  783. recipient_delimiter = +
  784.  
  785. # Support proxying to other LMTP/SMTP servers by performing passdb lookups.
  786. #lmtp_proxy = no
  787.  
  788. # When recipient address includes the detail (e.g. user+detail), try to save
  789. # the mail to the detail mailbox. See also recipient_delimiter and
  790. # lda_mailbox_autocreate settings.
  791. #lmtp_save_to_detail_mailbox = no
  792.  
  793. # Verify quota before replying to RCPT TO. This adds a small overhead.
  794. lmtp_rcpt_check_quota = yes
  795.  
  796.  
  797. # Which recipient address to use for Delivered-To: header and Received:
  798. # header. The default is "final", which is the same as the one given to
  799. # RCPT TO command. "original" uses the address given in RCPT TO's ORCPT
  800. # parameter, "none" uses nothing. Note that "none" is currently always used
  801. # when a mail has multiple recipients.
  802. #lmtp_hdr_delivery_address = final
  803.  
  804. ##
  805. ## LDA specific settings
  806. ##
  807.  
  808. protocol lda {
  809.   quota_full_tempfail = no
  810.   # Address to use when sending rejection mails.
  811.   # Default is postmaster@%d. %d expands to recipient domain.
  812.   postmaster_address = root
  813.  
  814.   # Hostname to use in various parts of sent mails (e.g. in Message-Id) and
  815.   # in LMTP replies. Default is the system's real hostname@domain.
  816.   #hostname =
  817.  
  818.   # Support for dynamically loadable plugins. mail_plugins is a space separated
  819.   # list of plugins to load.
  820.   mail_plugins = quota quota_clone zlib
  821.   #mail_plugin_dir = /usr/lib/dovecot/lda
  822.  
  823.   # Binary to use for sending mails.
  824.   #sendmail_path = /usr/lib/sendmail
  825.  
  826.   # If non-empty, send mails via this SMTP host[:port] instead of sendmail.
  827.   #submission_host =
  828.  
  829.   # Subject: header to use for rejection mails. You can use the same variables
  830.   # as for rejection_reason below.
  831.   #rejection_subject = Rejected: %s
  832.  
  833.   # UNIX socket path to master authentication server to find users.
  834.   #auth_socket_path = /var/run/dovecot/auth-master
  835. }
  836.  
  837. # Should saving a mail to a nonexistent mailbox automatically create it?
  838. lda_mailbox_autocreate = yes
  839.  
  840. # Should automatically created mailboxes be also automatically subscribed?
  841. #lda_mailbox_autosubscribe = no
  842.  
  843. ##
  844. ## Authentication processes
  845. ##
  846.  
  847. # Disable LOGIN command and all other plaintext authentications unless
  848. # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
  849. # matches the local IP (ie. you're connecting from the same computer), the
  850. # connection is considered secure and plaintext authentication is allowed.
  851. # See also ssl=required setting.
  852. disable_plaintext_auth = no
  853.  
  854. # Auth cache settings
  855.  
  856. # Authentication cache size (e.g. 10M). 0 means it's disabled. Note that
  857. # bsdauth, PAM and vpopmail require cache_key to be set for caching to be used.
  858. auth_cache_size = 1M
  859.  
  860. # Time to live for cached data. After TTL expires the cached record is no
  861. # longer used, *except* if the main database lookup returns internal failure.
  862. # We also try to handle password changes automatically: If user's previous
  863. # authentication was successful, but this one wasn't, the cache isn't used.
  864. # For now this works only with plaintext authentication.
  865. auth_cache_ttl = 3600 sec
  866.  
  867. # TTL for negative hits (user not found, password mismatch).
  868. # 0 disables caching them completely.
  869. auth_cache_negative_ttl = 3600 sec
  870.  
  871. # Space separated list of realms for SASL authentication mechanisms that need
  872. # them. You can leave it empty if you don't want to support multiple realms.
  873. # Many clients simply use the first one listed here, so keep the default realm
  874. # first.
  875. #auth_realms =
  876.  
  877. # Default realm/domain to use if none was specified. This is used for both
  878. # SASL realms and appending @domain to username in plaintext logins.
  879. #auth_default_realm =
  880.  
  881. # List of allowed characters in username. If the user-given username contains
  882. # a character not listed in here, the login automatically fails. This is just
  883. # an extra check to make sure user can't exploit any potential quote escaping
  884. # vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
  885. # set this value to empty.
  886. #Allow + in usernames
  887. auth_username_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$-=?^_{}~./@+%"
  888.  
  889. # Maximum number of dovecot-auth worker processes. They're used to execute
  890. # blocking passdb and userdb queries (eg. MySQL and PAM). They're
  891. # automatically created and destroyed as needed.
  892. #auth_worker_max_count = 30
  893.  
  894. # Time to delay before replying to failed authentications.
  895. #auth_failure_delay = 2 secs
  896.  
  897. # Space separated list of wanted authentication mechanisms:
  898. #   plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey
  899. #   gss-spnego
  900. # NOTE: See also disable_plaintext_auth setting.
  901. auth_mechanisms = plain login
  902.  
  903.  
  904.  
  905. ##
  906. ## Password and user databases
  907. ##
  908.  
  909. passdb {
  910.   driver = dict
  911.   args = /usr/local/cpanel/etc/dovecot/cpauthd-dict.conf
  912.   result_internalfail = continue
  913.   result_failure = return-fail
  914. }
  915.  
  916.  
  917.  
  918. userdb {
  919.    driver = prefetch
  920. }
  921. userdb {
  922.   driver = dict
  923.   args = /usr/local/cpanel/etc/dovecot/cpauthd-dict.conf
  924. }
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935. ##
  936. ## Log destination.
  937. ##
  938.  
  939. # Log file to use for error messages. "syslog" logs to syslog,
  940. # /dev/stderr logs to stderr.
  941. #log_path = syslog
  942.  
  943. # Log file to use for informational messages. Defaults to log_path.
  944. #info_log_path =
  945. # Log file to use for debug messages. Defaults to info_log_path.
  946. #debug_log_path =
  947.  
  948. # Syslog facility to use if you're logging to syslog. Usually if you don't
  949. # want to use "mail", you'll use local0..local7. Also other standard
  950. # facilities are supported.
  951. #syslog_facility = mail
  952.  
  953. ##
  954. ## Logging verbosity and debugging.
  955. ##
  956.  
  957. # Log unsuccessful authentication attempts and the reasons why they failed.
  958. #auth_verbose = no
  959.  
  960. # In case of password mismatches, log the attempted password. Valid values are
  961. # no, plain and sha1. sha1 can be useful for detecting brute force password
  962. # attempts vs. user simply trying the same password over and over again.
  963. # You can also truncate the value to n chars by appending ":n" (e.g. sha1:6).
  964. #auth_verbose_passwords = no
  965.  
  966. # Even more verbose logging for debugging purposes. Shows for example SQL
  967. # queries.
  968. #auth_debug = no
  969.  
  970. # In case of password mismatches, log the passwords and used scheme so the
  971. # problem can be debugged. Enabling this also enables auth_debug.
  972. #auth_debug_passwords = no
  973.  
  974. # Enable mail process debugging. This can help you figure out why Dovecot
  975. # isn't finding your mails.
  976. #mail_debug = no
  977.  
  978. # Show protocol level SSL errors.
  979. #verbose_ssl = no
  980.  
  981. # mail_log plugin provides more event logging for mail processes.
  982. plugin {
  983.   # Events to log. Also available: flag_change append
  984.   #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  985.   # Available fields: uid, box, msgid, from, subject, size, vsize, flags
  986.   # size and vsize are available only for expunge and copy events.
  987.   #mail_log_fields = uid box msgid size
  988. }
  989.  
  990. ##
  991. ## Log formatting.
  992. ##
  993.  
  994. # Prefix for each line written to log file. % codes are in strftime(3)
  995. # format.
  996. #log_timestamp = "%b %d %H:%M:%S "
  997.  
  998. # Space-separated list of elements we want to log. The elements which have
  999. # a non-empty variable value are joined together to form a comma-separated
  1000. # string.
  1001. #login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
  1002.  
  1003. # Login log format. %$ contains login_log_format_elements string, %s contains
  1004. # the data we want to log.
  1005. #login_log_format = %$: %s
  1006.  
  1007. # Log prefix for mail processes. See doc/wiki/Variables.txt for list of
  1008. # possible variables you can use.
  1009. #mail_log_prefix = "%s(%u)<%{pid}><%{session}>: "
  1010.  
  1011. # Format to use for logging mail deliveries:
  1012. #  %$ - Delivery status message (e.g. "saved to INBOX")
  1013. #  %m / %{msgid} - Message-ID
  1014. #  %s / %{subject} - Subject
  1015. #  %f / %{from} - From address
  1016. #  %p / %{size} - Physical size
  1017. #  %w / %{vsize} - Virtual size
  1018. #  %e / %{from_envelope} - MAIL FROM envelope
  1019. #  %{to_envelope} - RCPT TO envelope
  1020. #  %{delivery_time} - How many milliseconds it took to deliver the mail
  1021. #  %{session_time} - How long LMTP session took, not including delivery_time
  1022. #  %{storage_id} - Backend-specific ID for mail, e.g. Maildir filename
  1023. #deliver_log_format = msgid=%m: %$
  1024.  
  1025. ##
  1026. ## Services
  1027. ##
  1028.  
  1029. service config {
  1030.     vsz_limit = 2048 M
  1031. }
  1032.  
  1033. service quota-status {
  1034.   executable = quota-status -p postfix
  1035.   unix_listener {
  1036.     path = quota-status
  1037.     mode = 0666
  1038.   }
  1039. }
  1040.  
  1041. service auth {
  1042.   unix_listener auth-client {
  1043.     path = auth-client
  1044.     mode = 0666
  1045.   }
  1046.  
  1047. }
  1048.  
  1049.  
  1050. service stats {
  1051.   client_limit = 2000
  1052.   unix_listener stats-writer {
  1053.     mode = 0666
  1054.   }
  1055. }
  1056.  
  1057. plugin {
  1058.  
  1059.  
  1060. }
  1061.  
  1062. mail_access_groups = dovecot
  1063.  
  1064. service dict {
  1065.   unix_listener dict {
  1066.     mode = 0660
  1067.       group = dovecot
  1068.   }
  1069. }
  1070.  
  1071. # Disabled until we offically support Pigeonhole
  1072. #managesieve_notify_capability = mailto
  1073. #managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
  1074.  
  1075. service lmtp {
  1076. # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  1077. # files, so it shouldn't harm much even if this limit is set pretty high.
  1078.     vsz_limit = 512 M
  1079.     #process_min_avail =
  1080.  
  1081.     #We always want this. Otherwise one connection could block another
  1082.     #connection that shares the same process.
  1083.     client_limit = 1
  1084.  
  1085.     process_limit = 500
  1086.  
  1087.     unix_listener lmtp {
  1088.        user = mailnull
  1089.        group = mail
  1090.        mode = 0660
  1091.     }
  1092. }
  1093.  
  1094. service imap-login {
  1095. # Maximum number of connections allowed per each login process. This setting
  1096. # is used only if login_process_per_connection=no. Once the limit is reached,
  1097. # the process notifies master so that it can create a new login process.
  1098.   client_limit = 500
  1099. # Maximum number of login processes to create. The listening process count
  1100. # usually stays at login_processes_count, but when multiple users start logging
  1101. # in at the same time more extra processes are created. To prevent fork-bombing
  1102. # we check only once in a second if new processes should be created - if all
  1103. # of them are used at the time, we double their amount until the limit set by
  1104. # this setting is reached.
  1105.     process_limit = 50
  1106. # Number of login processes to keep for listening new connections.
  1107.     process_min_avail = 2
  1108. # Should each login be processed in its own process (yes), or should one
  1109. # login process be allowed to process multiple connections (no)? Yes is more
  1110. # secure, espcially with SSL/TLS enabled. No is faster since there's no need
  1111. # to create processes all the time.
  1112.     service_count = 0
  1113. # Set max. process size in megabytes. If you don't use
  1114. # login_process_per_connection you might need to grow this.
  1115.     vsz_limit = 128 M
  1116. # Drop all privileges before exec()ing the mail process. This is mostly
  1117. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1118. # security risk if you use single UID for multiple users, as the users could
  1119. # ptrace() each others processes then.
  1120.     #drop_priv_before_exec =
  1121. # chroot login process to the login_dir. Only reason not to do this is if you
  1122. # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
  1123. #chroot = yes
  1124. # User to use for the login process. Create a completely new user for this,
  1125. # and don't use it anywhere else. The user must also belong to a group where
  1126. # only it has access, it's used to control access for authentication process.
  1127. # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
  1128. #user = dovecot
  1129. # IP or host address where to listen in for non-SSL connections. Defaults
  1130. # to above if not specified.
  1131.     inet_listener imap {
  1132.       address = *,::
  1133.     }
  1134. # IP or host address where to listen in for SSL connections. Defaults
  1135. # to above if not specified.
  1136.     inet_listener imaps {
  1137.       address = *,::
  1138.     }
  1139. }
  1140.  
  1141. service imap {
  1142. # Maximum number of running mail processes. When this limit is reached,
  1143. # new users aren't allowed to log in.
  1144.     process_limit = 512
  1145. # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  1146. # files, so it shouldn't harm much even if this limit is set pretty high.
  1147.     vsz_limit = 512 M
  1148. # Drop all privileges before exec()ing the mail process. This is mostly
  1149. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1150. # security risk if you use single UID for multiple users, as the users could
  1151. # ptrace() each others processes then.
  1152.     #drop_priv_before_exec =
  1153. }
  1154.  
  1155. service managesieve-login {
  1156. # Maximum number of connections allowed per each login process. This setting
  1157. # is used only if login_process_per_connection=no. Once the limit is reached,
  1158. # the process notifies master so that it can create a new login process.
  1159.   client_limit = 500
  1160. # Maximum number of login processes to create. The listening process count
  1161. # usually stays at login_processes_count, but when multiple users start logging
  1162. # in at the same time more extra processes are created. To prevent fork-bombing
  1163. # we check only once in a second if new processes should be created - if all
  1164. # of them are used at the time, we double their amount until the limit set by
  1165. # this setting is reached.
  1166.     process_limit = 50
  1167. # Number of login processes to keep for listening new connections.
  1168.     process_min_avail = 2
  1169. # Should each login be processed in its own process (yes), or should one
  1170. # login process be allowed to process multiple connections (no)? Yes is more
  1171. # secure, espcially with SSL/TLS enabled. No is faster since there's no need
  1172. # to create processes all the time.
  1173.     service_count = 0
  1174. # Set max. process size in megabytes. If you don't use
  1175. # login_process_per_connection you might need to grow this.
  1176.     vsz_limit = 128 M
  1177. # Drop all privileges before exec()ing the mail process. This is mostly
  1178. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1179. # security risk if you use single UID for multiple users, as the users could
  1180. # ptrace() each others processes then.
  1181.     #drop_priv_before_exec =
  1182. # chroot login process to the login_dir. Only reason not to do this is if you
  1183. # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
  1184. #chroot = yes
  1185. # User to use for the login process. Create a completely new user for this,
  1186. # and don't use it anywhere else. The user must also belong to a group where
  1187. # only it has access, it's used to control access for authentication process.
  1188. # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
  1189. #user = dovecot
  1190.  
  1191. }
  1192.  
  1193. service managesieve {
  1194. # Maximum number of running mail processes. When this limit is reached,
  1195. # new users aren't allowed to log in.
  1196.     process_limit = 512
  1197. # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  1198. # files, so it shouldn't harm much even if this limit is set pretty high.
  1199.     vsz_limit = 512 M
  1200. # Drop all privileges before exec()ing the mail process. This is mostly
  1201. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1202. # security risk if you use single UID for multiple users, as the users could
  1203. # ptrace() each others processes then.
  1204.     #drop_priv_before_exec =
  1205. }
  1206.  
  1207. service pop3-login {
  1208. # Maximum number of connections allowed per each login process. This setting
  1209. # is used only if login_process_per_connection=no. Once the limit is reached,
  1210. # the process notifies master so that it can create a new login process.
  1211.   client_limit = 500
  1212. # Maximum number of login processes to create. The listening process count
  1213. # usually stays at login_processes_count, but when multiple users start logging
  1214. # in at the same time more extra processes are created. To prevent fork-bombing
  1215. # we check only once in a second if new processes should be created - if all
  1216. # of them are used at the time, we double their amount until the limit set by
  1217. # this setting is reached.
  1218.     process_limit = 50
  1219. # Number of login processes to keep for listening new connections.
  1220.     process_min_avail = 2
  1221. # Should each login be processed in its own process (yes), or should one
  1222. # login process be allowed to process multiple connections (no)? Yes is more
  1223. # secure, espcially with SSL/TLS enabled. No is faster since there's no need
  1224. # to create processes all the time.
  1225.     service_count = 0
  1226. # Set max. process size in megabytes. If you don't use
  1227. # login_process_per_connection you might need to grow this.
  1228.     vsz_limit = 128 M
  1229. # Drop all privileges before exec()ing the mail process. This is mostly
  1230. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1231. # security risk if you use single UID for multiple users, as the users could
  1232. # ptrace() each others processes then.
  1233.     #drop_priv_before_exec =
  1234. # chroot login process to the login_dir. Only reason not to do this is if you
  1235. # wish to run the whole Dovecot without roots. <doc/wiki/Rootless.txt>
  1236. #chroot = yes
  1237. # User to use for the login process. Create a completely new user for this,
  1238. # and don't use it anywhere else. The user must also belong to a group where
  1239. # only it has access, it's used to control access for authentication process.
  1240. # Note that this user is NOT used to access mails. <doc/wiki/UserIds.txt>
  1241. #user = dovecot
  1242. # IP or host address where to listen in for non-SSL connections. Defaults
  1243. # to above if not specified.
  1244.     inet_listener pop3 {
  1245.       address = *,::
  1246.     }
  1247. # IP or host address where to listen in for SSL connections. Defaults
  1248. # to above if not specified.
  1249.     inet_listener pop3s {
  1250.       address = *,::
  1251.     }
  1252. }
  1253.  
  1254. service pop3 {
  1255. # Maximum number of running mail processes. When this limit is reached,
  1256. # new users aren't allowed to log in.
  1257.     process_limit = 512
  1258. # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  1259. # files, so it shouldn't harm much even if this limit is set pretty high.
  1260.     vsz_limit = 512 M
  1261. # Drop all privileges before exec()ing the mail process. This is mostly
  1262. # meant for debugging, otherwise you don't get core dumps. It could be a small
  1263. # security risk if you use single UID for multiple users, as the users could
  1264. # ptrace() each others processes then.
  1265.     #drop_priv_before_exec =
  1266.  
  1267. }
  1268.  
  1269. # Should all processes be killed when Dovecot master process shuts down.
  1270. # Setting this to "no" means that Dovecot can be upgraded without
  1271. # forcing existing client connections to close (although that could also be
  1272. # a problem if the upgrade is e.g. because of a security fix).
  1273. #shutdown_clients = yes
  1274.  
  1275. # If non-zero, run mail commands via this many connections to doveadm server,
  1276. # instead of running them directly in the same process.
  1277. #doveadm_worker_count = 0
  1278. # UNIX socket or host:port used for connecting to doveadm server
  1279. #doveadm_socket_path = doveadm-server
  1280.  
  1281. # Space separated list of environment variables that are preserved on Dovecot
  1282. # startup and passed down to all of its child processes. You can also give
  1283. # key=value pairs to always set specific settings.
  1284. #import_environment = TZ
  1285.  
  1286. ##
  1287. ## Dictionary server settings
  1288. ##
  1289.  
  1290. # Dictionary can be used to store key=value lists. This is used by several
  1291. # plugins. The dictionary can be accessed either directly or though a
  1292. # dictionary server. The following dict block maps dictionary names to URIs
  1293. # when the server is used. These can then be referenced using URIs in format
  1294. # "proxy::<name>".
  1295.  
  1296. dict {
  1297.  
  1298.   expire = sqlite:/usr/local/cpanel/etc/dovecot/dovecot-dict-expire.conf.ext
  1299.  
  1300. }
  1301.  
  1302. plugin {
  1303.   # Here you can give some extra environment variables to mail processes.
  1304.   # This is mostly meant for passing parameters to plugins. %variable
  1305.   # expansion is done for all values.
  1306.  
  1307.   # Quota plugin. Multiple backends are supported:
  1308.   #   dirsize: Find and sum all the files found from mail directory.
  1309.   #            Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
  1310.   #   dict: Keep quota stored in dictionary (eg. SQL)
  1311.   #   maildir: Maildir++ quota
  1312.   #   fs: Read-only support for filesystem quota
  1313.   #
  1314.   # Quota limits are set using "quota_rule" parameters, either in here or in
  1315.   # userdb. It's also possible to give mailbox-specific limits, for example:
  1316.   #   quota_rule = *:storage=1048576
  1317.   #   quota_rule2 = Trash:storage=102400
  1318.   # User has now 1GB quota, but when saving to Trash mailbox the user gets
  1319.   # additional 100MB.
  1320.   #
  1321.   # Multiple quota roots are also possible, for example:
  1322.   #   quota = dict:user::proxy::quota
  1323.   #   quota2 = dict:domain:%d:proxy::quota_domain
  1324.   #   quota_rule = *:storage=102400
  1325.   #   quota2_rule = *:storage=1048576
  1326.   # Gives each user their own 100MB quota and one shared 1GB quota within
  1327.   # the domain.
  1328.   #
  1329.   # You can execute a given command when user exceeds a specified quota limit.
  1330.   # Each quota root has separate limits. Only the command for the first
  1331.   # exceeded limit is excecuted, so put the highest limit first.
  1332.   # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
  1333.   #   quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
  1334.   #   quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
  1335.  
  1336.   quota_exceeded_message = "Mailbox is full / Blocks limit exceeded / Inode limit exceeded"
  1337.  
  1338.   # ACL plugin. vfile backend reads ACLs from "dovecot-acl" file from maildir
  1339.   # directory. You can also optionally give a global ACL directory path where
  1340.   # ACLs are applied to all users' mailboxes. The global ACL directory contains
  1341.   # one file for each mailbox, eg. INBOX or sub.mailbox. cache_secs parameter
  1342.   # specifies how many seconds to wait between stat()ing dovecot-acl file
  1343.   # to see if it changed.
  1344.   acl = vfile:cache_secs=86400
  1345.  
  1346.   # To let users LIST mailboxes shared by other users, Dovecot needs a
  1347.   # shared mailbox dictionary. For example:
  1348.   #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  1349.  
  1350.   # Convert plugin. If set, specifies the source storage path which is
  1351.   # converted to destination storage (mail_location) when the user logs in.
  1352.   # The existing mail directory is renamed to <dir>-converted.
  1353.   #convert_mail = mbox:%h/mail
  1354.   # Skip mailboxes which we can't open successfully instead of aborting.
  1355.   #convert_skip_broken_mailboxes = no
  1356.   # Skip directories beginning with '.'
  1357.   #convert_skip_dotdirs = no
  1358.   # If source storage has mailbox names with destination storage's hierarchy
  1359.   # separators, replace them with this character.
  1360.   #convert_alt_hierarchy_char = _
  1361.  
  1362.   # Trash plugin. When saving a message would make user go over quota, this
  1363.   # plugin automatically deletes the oldest mails from configured mailboxes
  1364.   # until the message can be saved within quota limits. The configuration file
  1365.   # is a text file where each line is in format: <priority> <mailbox name>
  1366.   # Mails are first deleted in lowest -> highest priority number order
  1367.   #trash = /etc/dovecot-trash.conf
  1368.  
  1369.   # Expire plugin. Mails are expunged from mailboxes after being there the
  1370.   # configurable time. The first expiration date for each mailbox is stored in
  1371.   # a dictionary so it can be quickly determined which mailboxes contain
  1372.   # expired mails. The actual expunging is done in a nightly cronjob, which
  1373.   # you must set up:
  1374.   #   dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool
  1375.   #expire = Trash 7 Spam 30
  1376.   #expire_dict = db:/var/lib/dovecot/expire.db
  1377.  
  1378.   expire_dict = proxy::expire
  1379.   expire = Trash
  1380.   expire2 = "Deleted Messages"
  1381.   expire3 = "INBOX.Deleted Messages"
  1382.   expire4 = INBOX.Trash
  1383.  
  1384.   # Enable caching of dict value in dovecot.index file. This significantly reduces
  1385.   # the number of dict lookups. It makes initial testing more confusing though, so
  1386.   # it's better to enable it only after you've verified that the expire plugin is
  1387.   # working as wanted. (v2.2.16+)
  1388.   expire_cache = yes
  1389.  
  1390.  
  1391.   # Lazy expunge plugin. Currently works only with maildirs. When a user
  1392.   # expunges mails, the mails are moved to a mailbox in another namespace
  1393.   # (1st). When a mailbox is deleted, the mailbox is moved to another namespace
  1394.   # (2nd) as well. Also if the deleted mailbox had any expunged messages,
  1395.   # they're moved to a 3rd namespace. The mails won't be counted in quota,
  1396.   # and they're not deleted automatically (use a cronjob or something).
  1397.   #lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement