dovecot.conf 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. # --------------------------------------------------------------------------
  2. # Please create a file "extra.conf" for persistent overrides to dovecot.conf
  3. # --------------------------------------------------------------------------
  4. # LDAP example:
  5. #passdb {
  6. # args = /usr/local/etc/dovecot/ldap/passdb.conf
  7. # driver = ldap
  8. #}
  9. auth_mechanisms = plain login
  10. #mail_debug = yes
  11. #auth_debug = yes
  12. log_path = syslog
  13. disable_plaintext_auth = yes
  14. # Uncomment on NFS share
  15. #mmap_disable = yes
  16. #mail_fsync = always
  17. #mail_nfs_index = yes
  18. #mail_nfs_storage = yes
  19. login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k"
  20. mail_home = /var/vmail/%d/%n
  21. mail_location = maildir:~/
  22. mail_plugins = </usr/local/etc/dovecot/mail_plugins
  23. mail_attachment_fs = crypt:set_prefix=mail_crypt_global:posix:
  24. mail_attachment_dir = /var/attachments
  25. mail_attachment_min_size = 128k
  26. # Dovecot 2.2
  27. #ssl_protocols = !SSLv3
  28. # Dovecot 2.3
  29. ssl_min_protocol = TLSv1
  30. ssl_prefer_server_ciphers = yes
  31. ssl_cipher_list = ALL:!ADH:!LOW:!SSLv2:!SSLv3:!EXP:!aNULL:!eNULL:!3DES:!MD5:!PSK:!DSS:!RC4:!SEED:!IDEA:+HIGH:+MEDIUM
  32. # Default in Dovecot 2.3
  33. ssl_options = no_compression
  34. # New in Dovecot 2.3
  35. ssl_dh=</etc/ssl/mail/dhparams.pem
  36. # Dovecot 2.2
  37. #ssl_dh_parameters_length = 2048
  38. log_timestamp = "%Y-%m-%d %H:%M:%S "
  39. recipient_delimiter = +
  40. auth_master_user_separator = *
  41. mail_shared_explicit_inbox = yes
  42. mail_prefetch_count = 30
  43. passdb {
  44. driver = passwd-file
  45. args = /usr/local/etc/dovecot/dovecot-master.passwd
  46. master = yes
  47. pass = yes
  48. }
  49. passdb {
  50. args = /usr/local/etc/dovecot/sql/dovecot-dict-sql-passdb.conf
  51. driver = sql
  52. result_success = return-ok
  53. result_failure = continue
  54. result_internalfail = continue
  55. }
  56. passdb {
  57. driver = passwd-file
  58. args = /usr/local/etc/dovecot/dovecot-master.passwd
  59. skip = authenticated
  60. }
  61. # Set doveadm_password=your-secret-password in data/conf/dovecot/extra.conf (create if missing)
  62. service doveadm {
  63. inet_listener {
  64. port = 12345
  65. }
  66. }
  67. namespace inbox {
  68. inbox = yes
  69. location =
  70. separator = /
  71. mailbox "Trash" {
  72. auto = subscribe
  73. special_use = \Trash
  74. }
  75. mailbox "Deleted Messages" {
  76. special_use = \Trash
  77. }
  78. mailbox "Deleted Items" {
  79. special_use = \Trash
  80. }
  81. mailbox "Rubbish" {
  82. special_use = \Trash
  83. }
  84. mailbox "Gelöschte Objekte" {
  85. special_use = \Trash
  86. }
  87. mailbox "Gelöschte Elemente" {
  88. special_use = \Trash
  89. }
  90. mailbox "Papierkorb" {
  91. special_use = \Trash
  92. }
  93. mailbox "Itens Excluidos" {
  94. special_use = \Trash
  95. }
  96. mailbox "Itens Excluídos" {
  97. special_use = \Trash
  98. }
  99. mailbox "Lixeira" {
  100. special_use = \Trash
  101. }
  102. mailbox "Prullenbak" {
  103. special_use = \Trash
  104. }
  105. mailbox "Verwijderde items" {
  106. special_use = \Trash
  107. }
  108. mailbox "Archive" {
  109. auto = subscribe
  110. special_use = \Archive
  111. }
  112. mailbox "Archiv" {
  113. special_use = \Archive
  114. }
  115. mailbox "Archives" {
  116. special_use = \Archive
  117. }
  118. mailbox "Arquivo" {
  119. special_use = \Archive
  120. }
  121. mailbox "Arquivos" {
  122. special_use = \Archive
  123. }
  124. mailbox "Archief" {
  125. special_use = \Archive
  126. }
  127. mailbox "Sent" {
  128. auto = subscribe
  129. special_use = \Sent
  130. }
  131. mailbox "Sent Messages" {
  132. special_use = \Sent
  133. }
  134. mailbox "Sent Items" {
  135. special_use = \Sent
  136. }
  137. mailbox "Gesendet" {
  138. special_use = \Sent
  139. }
  140. mailbox "Gesendete Objekte" {
  141. special_use = \Sent
  142. }
  143. mailbox "Gesendete Elemente" {
  144. special_use = \Sent
  145. }
  146. mailbox "Itens Enviados" {
  147. special_use = \Sent
  148. }
  149. mailbox "Enviados" {
  150. special_use = \Sent
  151. }
  152. mailbox "Verzonden items" {
  153. special_use = \Sent
  154. }
  155. mailbox "Verzonden" {
  156. special_use = \Sent
  157. }
  158. mailbox "Drafts" {
  159. auto = subscribe
  160. special_use = \Drafts
  161. }
  162. mailbox "Entwürfe" {
  163. special_use = \Drafts
  164. }
  165. mailbox "Rascunhos" {
  166. special_use = \Drafts
  167. }
  168. mailbox "Concepten" {
  169. special_use = \Drafts
  170. }
  171. mailbox "Junk" {
  172. auto = subscribe
  173. special_use = \Junk
  174. }
  175. mailbox "Junk-E-Mail" {
  176. special_use = \Junk
  177. }
  178. mailbox "Junk E-Mail" {
  179. special_use = \Junk
  180. }
  181. mailbox "Spam" {
  182. special_use = \Junk
  183. }
  184. mailbox "Lixo Eletrônico" {
  185. special_use = \Junk
  186. }
  187. mailbox "Ongewenste e-mail" {
  188. special_use = \Junk
  189. }
  190. mailbox "Koncepty" {
  191. special_use = \Drafts
  192. }
  193. mailbox "Nevyžádaná pošta" {
  194. special_use = \Junk
  195. }
  196. mailbox "Odstraněná pošta" {
  197. special_use = \Trash
  198. }
  199. mailbox "Odeslaná pošta" {
  200. special_use = \Sent
  201. }
  202. prefix =
  203. }
  204. namespace {
  205. type = shared
  206. separator = /
  207. prefix = Shared/%%u/
  208. location = maildir:%%h/:INDEX=~/Shared/%%u;CONTROL=~/Shared/%%u
  209. subscriptions = no
  210. list = children
  211. }
  212. protocols = imap sieve lmtp pop3
  213. service dict {
  214. unix_listener dict {
  215. mode = 0660
  216. user = vmail
  217. group = vmail
  218. }
  219. }
  220. service log {
  221. user = dovenull
  222. }
  223. service config {
  224. unix_listener config {
  225. user = root
  226. group = vmail
  227. mode = 0660
  228. }
  229. }
  230. service auth {
  231. inet_listener auth-inet {
  232. port = 10001
  233. }
  234. unix_listener auth-master {
  235. mode = 0600
  236. user = vmail
  237. }
  238. unix_listener auth-userdb {
  239. mode = 0600
  240. user = vmail
  241. }
  242. }
  243. service managesieve-login {
  244. inet_listener sieve {
  245. port = 4190
  246. }
  247. service_count = 1
  248. process_min_avail = 2
  249. vsz_limit = 1G
  250. }
  251. service imap-login {
  252. service_count = 1
  253. process_limit = 10000
  254. vsz_limit = 1G
  255. user = dovenull
  256. }
  257. service pop3-login {
  258. service_count = 1
  259. vsz_limit = 1G
  260. }
  261. service imap {
  262. executable = imap imap-postlogin
  263. user = vmail
  264. vsz_limit = 1G
  265. }
  266. service managesieve {
  267. process_limit = 256
  268. }
  269. service lmtp {
  270. inet_listener lmtp-inet {
  271. port = 24
  272. }
  273. user = vmail
  274. }
  275. listen = *,[::]
  276. ssl_cert = </etc/ssl/mail/cert.pem
  277. ssl_key = </etc/ssl/mail/key.pem
  278. userdb {
  279. driver = passwd-file
  280. args = /usr/local/etc/dovecot/dovecot-master.userdb
  281. }
  282. userdb {
  283. args = /usr/local/etc/dovecot/sql/dovecot-dict-sql-userdb.conf
  284. driver = sql
  285. skip = found
  286. }
  287. protocol imap {
  288. mail_plugins = </usr/local/etc/dovecot/mail_plugins_imap
  289. imap_metadata = yes
  290. }
  291. mail_attribute_dict = file:%h/dovecot-attributes
  292. protocol lmtp {
  293. mail_plugins = </usr/local/etc/dovecot/mail_plugins_lmtp
  294. auth_socket_path = /usr/local/var/run/dovecot/auth-master
  295. }
  296. protocol sieve {
  297. managesieve_logout_format = bytes=%i/%o
  298. }
  299. plugin {
  300. # Allow "any" or "authenticated" to be used in ACLs
  301. acl_anyone = </usr/local/etc/dovecot/acl_anyone
  302. acl_shared_dict = file:/var/vmail/shared-mailboxes.db
  303. acl = vfile
  304. fts = solr
  305. fts_autoindex = yes
  306. fts_solr = break-imap-search url=http://solr:8983/solr/dovecot/
  307. fts_index_fs = crypt:set_prefix=fscrypt_index:posix:
  308. fscrypt_index_public_key = </mail_crypt/ecpubkey.pem
  309. fscrypt_index_private_key = </mail_crypt/ecprivkey.pem
  310. quota = dict:Userquota::proxy::sqlquota
  311. quota_rule2 = Trash:storage=+100%%
  312. sieve = /var/vmail/sieve/%u.sieve
  313. sieve_plugins = sieve_imapsieve sieve_extprograms
  314. sieve_vacation_send_from_recipient = yes
  315. # From elsewhere to Spam folder
  316. imapsieve_mailbox1_name = Junk
  317. imapsieve_mailbox1_causes = COPY
  318. imapsieve_mailbox1_before = file:/usr/local/lib/dovecot/sieve/report-spam.sieve
  319. # END
  320. # From Spam folder to elsewhere
  321. imapsieve_mailbox2_name = *
  322. imapsieve_mailbox2_from = Junk
  323. imapsieve_mailbox2_causes = COPY
  324. imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve
  325. # END
  326. sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
  327. sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute +vacation-seconds
  328. sieve_max_script_size = 1M
  329. sieve_max_redirects = 30
  330. sieve_quota_max_scripts = 0
  331. sieve_quota_max_storage = 0
  332. listescape_char = "\\"
  333. sieve_vacation_min_period = 5s
  334. sieve_vacation_max_period = 0
  335. sieve_vacation_default_period = 60s
  336. sieve_before = dict:proxy::sieve_before;name=active;bindir=/var/vmail/sieve_before_bindir
  337. sieve_after = dict:proxy::sieve_after;name=active;bindir=/var/vmail/sieve_after_bindir
  338. sieve_after2 = /var/vmail/sieve/global.sieve
  339. # -- Global keys
  340. mail_crypt_global_private_key = </mail_crypt/ecprivkey.pem
  341. mail_crypt_global_public_key = </mail_crypt/ecpubkey.pem
  342. mail_crypt_save_version = 2
  343. # Enable compression while saving, lz4 Dovecot v2.2.11+
  344. zlib_save = lz4
  345. mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  346. mail_log_fields = uid box msgid size
  347. mail_log_cached_only = yes
  348. }
  349. dict {
  350. sqlquota = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-quota.conf
  351. sieve_after = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_after.conf
  352. sieve_before = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_before.conf
  353. }
  354. remote 127.0.0.1 {
  355. disable_plaintext_auth = no
  356. }
  357. submission_host = postfix:588
  358. mail_max_userip_connections = 500
  359. service imap-postlogin {
  360. executable = script-login /usr/local/bin/postlogin.sh
  361. unix_listener imap-postlogin {
  362. }
  363. }
  364. service stats {
  365. unix_listener stats-writer {
  366. mode = 0660
  367. user = vmail
  368. }
  369. }
  370. imap_max_line_length = 2 M
  371. auth_cache_verify_password_with_worker = yes
  372. auth_cache_negative_ttl = 0
  373. auth_cache_ttl = 30 s
  374. auth_cache_size = 2 M
  375. !include_try /usr/local/etc/dovecot/extra.conf
  376. default_client_limit = 10400