Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | # -------------------------------------------------------------------------- |
| 2 | # Please create a file "extra.conf" for persistent overrides to dovecot.conf |
| 3 | # -------------------------------------------------------------------------- |
| 4 | # LDAP example: |
| 5 | #passdb { |
| 6 | # args = /etc/dovecot/ldap/passdb.conf |
| 7 | # driver = ldap |
| 8 | #} |
| 9 | |
| 10 | auth_mechanisms = plain login |
| 11 | #mail_debug = yes |
| 12 | #auth_debug = yes |
| 13 | log_path = syslog |
| 14 | disable_plaintext_auth = yes |
| 15 | # Uncomment on NFS share |
| 16 | #mmap_disable = yes |
| 17 | #mail_fsync = always |
| 18 | #mail_nfs_index = yes |
| 19 | #mail_nfs_storage = yes |
| 20 | login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k" |
| 21 | mail_home = /var/vmail/%d/%n |
| 22 | mail_location = maildir:~/ |
| 23 | mail_plugins = </etc/dovecot/mail_plugins |
| 24 | mail_attachment_fs = crypt:set_prefix=mail_crypt_global:posix: |
| 25 | mail_attachment_dir = /var/attachments |
| 26 | mail_attachment_min_size = 128k |
| 27 | |
| 28 | # Dovecot 2.2 |
| 29 | #ssl_protocols = !SSLv3 |
| 30 | # Dovecot 2.3 |
| 31 | ssl_min_protocol = TLSv1.2 |
| 32 | |
| 33 | ssl_prefer_server_ciphers = yes |
| 34 | ssl_cipher_list = ALL:!ADH:!LOW:!SSLv2:!SSLv3:!EXP:!aNULL:!eNULL:!3DES:!MD5:!PSK:!DSS:!RC4:!SEED:!IDEA:+HIGH:+MEDIUM |
| 35 | |
| 36 | # Default in Dovecot 2.3 |
| 37 | ssl_options = no_compression no_ticket |
| 38 | |
| 39 | # New in Dovecot 2.3 |
| 40 | ssl_dh = </etc/ssl/mail/dhparams.pem |
| 41 | # Dovecot 2.2 |
| 42 | #ssl_dh_parameters_length = 2048 |
| 43 | log_timestamp = "%Y-%m-%d %H:%M:%S " |
| 44 | recipient_delimiter = + |
| 45 | auth_master_user_separator = * |
| 46 | mail_shared_explicit_inbox = yes |
| 47 | mail_prefetch_count = 30 |
| 48 | # try a master passwd |
| 49 | passdb { |
| 50 | driver = passwd-file |
| 51 | args = /etc/dovecot/dovecot-master.passwd |
| 52 | master = yes |
| 53 | pass = yes |
| 54 | result_failure = continue |
| 55 | result_internalfail = continue |
| 56 | } |
| 57 | # try an app passwd |
| 58 | passdb { |
| 59 | driver = lua |
| 60 | args = file=/etc/dovecot/lua/app-passdb.lua blocking=yes |
| 61 | pass = yes |
| 62 | result_failure = continue |
| 63 | result_internalfail = continue |
| 64 | } |
| 65 | # check for regular password - if empty (e.g. force-passwd-reset), previous pass=yes passdbs also fail |
| 66 | # a return of the following passdb is mandatory |
| 67 | passdb { |
| 68 | args = /etc/dovecot/sql/dovecot-dict-sql-passdb.conf |
| 69 | driver = sql |
| 70 | result_success = return-ok |
| 71 | result_failure = continue |
| 72 | result_internalfail = continue |
| 73 | } |
| 74 | passdb { |
| 75 | driver = passwd-file |
| 76 | args = /etc/dovecot/dovecot-master.passwd |
| 77 | skip = authenticated |
| 78 | } |
| 79 | # Set doveadm_password=your-secret-password in data/conf/dovecot/extra.conf (create if missing) |
| 80 | service doveadm { |
| 81 | inet_listener { |
| 82 | port = 12345 |
| 83 | } |
| 84 | vsz_limit=2048 MB |
| 85 | } |
| 86 | namespace inbox { |
| 87 | inbox = yes |
| 88 | location = |
| 89 | separator = / |
| 90 | mailbox "Trash" { |
| 91 | auto = subscribe |
| 92 | special_use = \Trash |
| 93 | } |
| 94 | mailbox "Deleted Messages" { |
| 95 | special_use = \Trash |
| 96 | } |
| 97 | mailbox "Deleted Items" { |
| 98 | special_use = \Trash |
| 99 | } |
| 100 | mailbox "Rubbish" { |
| 101 | special_use = \Trash |
| 102 | } |
| 103 | mailbox "Gelöschte Objekte" { |
| 104 | special_use = \Trash |
| 105 | } |
| 106 | mailbox "Gelöschte Elemente" { |
| 107 | special_use = \Trash |
| 108 | } |
| 109 | mailbox "Papierkorb" { |
| 110 | special_use = \Trash |
| 111 | } |
| 112 | mailbox "Itens Excluidos" { |
| 113 | special_use = \Trash |
| 114 | } |
| 115 | mailbox "Itens Excluídos" { |
| 116 | special_use = \Trash |
| 117 | } |
| 118 | mailbox "Lixeira" { |
| 119 | special_use = \Trash |
| 120 | } |
| 121 | mailbox "Prullenbak" { |
| 122 | special_use = \Trash |
| 123 | } |
| 124 | mailbox "Odstránené položky" { |
| 125 | special_use = \Trash |
| 126 | } |
| 127 | mailbox "Koš" { |
| 128 | special_use = \Trash |
| 129 | } |
| 130 | mailbox "Verwijderde items" { |
| 131 | special_use = \Trash |
| 132 | } |
| 133 | mailbox "废件箱" { |
| 134 | special_use = \Trash |
| 135 | } |
| 136 | mailbox "已删除消息" { |
| 137 | special_use = \Trash |
| 138 | } |
| 139 | mailbox "已删除邮件" { |
| 140 | special_use = \Trash |
| 141 | } |
| 142 | mailbox "Archive" { |
| 143 | auto = subscribe |
| 144 | special_use = \Archive |
| 145 | } |
| 146 | mailbox "Archiv" { |
| 147 | special_use = \Archive |
| 148 | } |
| 149 | mailbox "Archives" { |
| 150 | special_use = \Archive |
| 151 | } |
| 152 | mailbox "Arquivo" { |
| 153 | special_use = \Archive |
| 154 | } |
| 155 | mailbox "Arquivos" { |
| 156 | special_use = \Archive |
| 157 | } |
| 158 | mailbox "Archief" { |
| 159 | special_use = \Archive |
| 160 | } |
| 161 | mailbox "Archív" { |
| 162 | special_use = \Archive |
| 163 | } |
| 164 | mailbox "Archivovať" { |
| 165 | special_use = \Archive |
| 166 | } |
| 167 | mailbox "归档" { |
| 168 | special_use = \Archive |
| 169 | } |
| 170 | mailbox "Sent" { |
| 171 | auto = subscribe |
| 172 | special_use = \Sent |
| 173 | } |
| 174 | mailbox "Sent Messages" { |
| 175 | special_use = \Sent |
| 176 | } |
| 177 | mailbox "Sent Items" { |
| 178 | special_use = \Sent |
| 179 | } |
| 180 | mailbox "已发送" { |
| 181 | special_use = \Sent |
| 182 | } |
| 183 | mailbox "已发送消息" { |
| 184 | special_use = \Sent |
| 185 | } |
| 186 | mailbox "已发送邮件" { |
| 187 | special_use = \Sent |
| 188 | } |
| 189 | mailbox "Gesendet" { |
| 190 | special_use = \Sent |
| 191 | } |
| 192 | mailbox "Gesendete Objekte" { |
| 193 | special_use = \Sent |
| 194 | } |
| 195 | mailbox "Gesendete Elemente" { |
| 196 | special_use = \Sent |
| 197 | } |
| 198 | mailbox "Itens Enviados" { |
| 199 | special_use = \Sent |
| 200 | } |
| 201 | mailbox "Enviados" { |
| 202 | special_use = \Sent |
| 203 | } |
| 204 | mailbox "Verzonden items" { |
| 205 | special_use = \Sent |
| 206 | } |
| 207 | mailbox "Verzonden" { |
| 208 | special_use = \Sent |
| 209 | } |
| 210 | mailbox "Odoslaná pošta" { |
| 211 | special_use = \Sent |
| 212 | } |
| 213 | mailbox "Odoslané" { |
| 214 | special_use = \Sent |
| 215 | } |
| 216 | mailbox "Drafts" { |
| 217 | auto = subscribe |
| 218 | special_use = \Drafts |
| 219 | } |
| 220 | mailbox "Entwürfe" { |
| 221 | special_use = \Drafts |
| 222 | } |
| 223 | mailbox "Rascunhos" { |
| 224 | special_use = \Drafts |
| 225 | } |
| 226 | mailbox "Concepten" { |
| 227 | special_use = \Drafts |
| 228 | } |
| 229 | mailbox "Koncepty" { |
| 230 | special_use = \Drafts |
| 231 | } |
| 232 | mailbox "草稿" { |
| 233 | special_use = \Drafts |
| 234 | } |
| 235 | mailbox "草稿箱" { |
| 236 | special_use = \Drafts |
| 237 | } |
| 238 | mailbox "Junk" { |
| 239 | auto = subscribe |
| 240 | special_use = \Junk |
| 241 | } |
| 242 | mailbox "Junk-E-Mail" { |
| 243 | special_use = \Junk |
| 244 | } |
| 245 | mailbox "Junk E-Mail" { |
| 246 | special_use = \Junk |
| 247 | } |
| 248 | mailbox "Spam" { |
| 249 | special_use = \Junk |
| 250 | } |
| 251 | mailbox "Lixo Eletrônico" { |
| 252 | special_use = \Junk |
| 253 | } |
| 254 | mailbox "Nevyžiadaná pošta" { |
| 255 | special_use = \Junk |
| 256 | } |
| 257 | mailbox "Infikované položky" { |
| 258 | special_use = \Junk |
| 259 | } |
| 260 | mailbox "Ongewenste e-mail" { |
| 261 | special_use = \Junk |
| 262 | } |
| 263 | mailbox "垃圾" { |
| 264 | special_use = \Junk |
| 265 | } |
| 266 | mailbox "垃圾箱" { |
| 267 | special_use = \Junk |
| 268 | } |
| 269 | mailbox "Koncepty" { |
| 270 | special_use = \Drafts |
| 271 | } |
| 272 | mailbox "Nevyžádaná pošta" { |
| 273 | special_use = \Junk |
| 274 | } |
| 275 | mailbox "Odstraněná pošta" { |
| 276 | special_use = \Trash |
| 277 | } |
| 278 | mailbox "Odeslaná pošta" { |
| 279 | special_use = \Sent |
| 280 | } |
| 281 | mailbox "Skräp" { |
| 282 | special_use = \Trash |
| 283 | } |
| 284 | mailbox "Borttagna Meddelanden" { |
| 285 | special_use = \Trash |
| 286 | } |
| 287 | mailbox "Arkiv" { |
| 288 | special_use = \Archive |
| 289 | } |
| 290 | mailbox "Arkeverat" { |
| 291 | special_use = \Archive |
| 292 | } |
| 293 | mailbox "Skickat" { |
| 294 | special_use = \Sent |
| 295 | } |
| 296 | mailbox "Skickade Meddelanden" { |
| 297 | special_use = \Sent |
| 298 | } |
| 299 | mailbox "Utkast" { |
| 300 | special_use = \Drafts |
| 301 | } |
| 302 | prefix = |
| 303 | } |
| 304 | protocols = imap sieve lmtp pop3 |
| 305 | service dict { |
| 306 | unix_listener dict { |
| 307 | mode = 0660 |
| 308 | user = vmail |
| 309 | group = vmail |
| 310 | } |
| 311 | } |
| 312 | service log { |
| 313 | user = dovenull |
| 314 | } |
| 315 | service config { |
| 316 | unix_listener config { |
| 317 | user = root |
| 318 | group = vmail |
| 319 | mode = 0660 |
| 320 | } |
| 321 | } |
| 322 | service auth { |
| 323 | inet_listener auth-inet { |
| 324 | port = 10001 |
| 325 | } |
| 326 | unix_listener auth-master { |
| 327 | mode = 0600 |
| 328 | user = vmail |
| 329 | } |
| 330 | unix_listener auth-userdb { |
| 331 | mode = 0600 |
| 332 | user = vmail |
| 333 | } |
| 334 | } |
| 335 | service managesieve-login { |
| 336 | inet_listener sieve { |
| 337 | port = 4190 |
| 338 | } |
| 339 | inet_listener sieve_haproxy { |
| 340 | port = 14190 |
| 341 | haproxy = yes |
| 342 | } |
| 343 | service_count = 1 |
| 344 | process_min_avail = 2 |
| 345 | vsz_limit = 1G |
| 346 | } |
| 347 | service imap-login { |
| 348 | service_count = 1 |
| 349 | process_limit = 10000 |
| 350 | vsz_limit = 1G |
| 351 | user = dovenull |
| 352 | inet_listener imap_haproxy { |
| 353 | port = 10143 |
| 354 | haproxy = yes |
| 355 | } |
| 356 | inet_listener imaps_haproxy { |
| 357 | port = 10993 |
| 358 | ssl = yes |
| 359 | haproxy = yes |
| 360 | } |
| 361 | } |
| 362 | service pop3-login { |
| 363 | service_count = 1 |
| 364 | vsz_limit = 1G |
| 365 | inet_listener pop3_haproxy { |
| 366 | port = 10110 |
| 367 | haproxy = yes |
| 368 | } |
| 369 | inet_listener pop3s_haproxy { |
| 370 | port = 10995 |
| 371 | ssl = yes |
| 372 | haproxy = yes |
| 373 | } |
| 374 | } |
| 375 | service imap { |
| 376 | executable = imap imap-postlogin |
| 377 | user = vmail |
| 378 | vsz_limit = 1G |
| 379 | } |
| 380 | service managesieve { |
| 381 | process_limit = 256 |
| 382 | } |
| 383 | service lmtp { |
| 384 | inet_listener lmtp-inet { |
| 385 | port = 24 |
| 386 | } |
| 387 | user = vmail |
| 388 | } |
| 389 | listen = *,[::] |
| 390 | ssl_cert = </etc/ssl/mail/cert.pem |
| 391 | ssl_key = </etc/ssl/mail/key.pem |
| 392 | !include_try /etc/dovecot/sni.conf |
| 393 | !include_try /etc/dovecot/sogo_trusted_ip.conf |
| 394 | userdb { |
| 395 | driver = passwd-file |
| 396 | args = /etc/dovecot/dovecot-master.userdb |
| 397 | } |
| 398 | userdb { |
| 399 | args = /etc/dovecot/sql/dovecot-dict-sql-userdb.conf |
| 400 | driver = sql |
| 401 | skip = found |
| 402 | } |
| 403 | protocol imap { |
| 404 | mail_plugins = </etc/dovecot/mail_plugins_imap |
| 405 | imap_metadata = yes |
| 406 | } |
| 407 | mail_attribute_dict = file:%h/dovecot-attributes |
| 408 | protocol lmtp { |
| 409 | mail_plugins = </etc/dovecot/mail_plugins_lmtp |
| 410 | auth_socket_path = /var/run/dovecot/auth-master |
| 411 | } |
| 412 | protocol sieve { |
| 413 | managesieve_logout_format = bytes=%i/%o |
| 414 | } |
| 415 | plugin { |
| 416 | # Allow "any" or "authenticated" to be used in ACLs |
| 417 | acl_anyone = </etc/dovecot/acl_anyone |
| 418 | acl_shared_dict = file:/var/vmail/shared-mailboxes.db |
| 419 | acl = vfile |
| 420 | last_login_dict = </etc/dovecot/last_login |
| 421 | last_login_key = last-login/%s/%u |
| 422 | fts = solr |
| 423 | fts_autoindex = yes |
| 424 | fts_solr = url=http://solr:8983/solr/dovecot-fts/ |
| 425 | quota = dict:Userquota::proxy::sqlquota |
| 426 | quota_rule2 = Trash:storage=+100%% |
| 427 | sieve = /var/vmail/sieve/%u.sieve |
| 428 | sieve_plugins = sieve_imapsieve sieve_extprograms |
| 429 | sieve_vacation_send_from_recipient = yes |
| 430 | sieve_redirect_envelope_from = recipient |
| 431 | # From elsewhere to Spam folder |
| 432 | imapsieve_mailbox1_name = Junk |
| 433 | imapsieve_mailbox1_causes = COPY |
| 434 | imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve |
| 435 | # END |
| 436 | # From Spam folder to elsewhere |
| 437 | imapsieve_mailbox2_name = * |
| 438 | imapsieve_mailbox2_from = Junk |
| 439 | imapsieve_mailbox2_causes = COPY |
| 440 | imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve |
| 441 | # END |
| 442 | quota_warning = storage=95%% quota-warning 95 %u |
| 443 | quota_warning2 = storage=80%% quota-warning 80 %u |
| 444 | sieve_pipe_bin_dir = /usr/lib/dovecot/sieve |
| 445 | sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute |
| 446 | sieve_extensions = +notify +imapflags +vacation-seconds +editheader |
| 447 | sieve_max_script_size = 1M |
| 448 | sieve_max_redirects = 100 |
| 449 | sieve_max_actions = 101 |
| 450 | sieve_quota_max_scripts = 0 |
| 451 | sieve_quota_max_storage = 0 |
| 452 | listescape_char = "\\" |
| 453 | sieve_vacation_min_period = 5s |
| 454 | sieve_vacation_max_period = 0 |
| 455 | sieve_vacation_default_period = 60s |
| 456 | sieve_before = /var/vmail/sieve/global_sieve_before.sieve |
| 457 | sieve_before2 = dict:proxy::sieve_before;name=active;bindir=/var/vmail/sieve_before_bindir |
| 458 | sieve_after = dict:proxy::sieve_after;name=active;bindir=/var/vmail/sieve_after_bindir |
| 459 | sieve_after2 = /var/vmail/sieve/global_sieve_after.sieve |
| 460 | sieve_duplicate_default_period = 1m |
| 461 | sieve_duplicate_max_period = 7d |
| 462 | sieve_vacation_dont_check_recipient = yes |
| 463 | |
| 464 | # -- Global keys |
| 465 | mail_crypt_global_private_key = </mail_crypt/ecprivkey.pem |
| 466 | mail_crypt_global_public_key = </mail_crypt/ecpubkey.pem |
| 467 | mail_crypt_save_version = 2 |
| 468 | |
| 469 | # Enable compression while saving, lz4 Dovecot v2.2.11+ |
| 470 | zlib_save = lz4 |
| 471 | |
| 472 | mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename |
| 473 | mail_log_fields = uid box msgid size |
| 474 | mail_log_cached_only = yes |
| 475 | } |
| 476 | service quota-warning { |
| 477 | executable = script /usr/local/bin/quota_notify.py |
| 478 | # use some unprivileged user for executing the quota warnings |
| 479 | user = vmail |
| 480 | unix_listener quota-warning { |
| 481 | user = vmail |
| 482 | } |
| 483 | } |
| 484 | dict { |
| 485 | sqlquota = mysql:/etc/dovecot/sql/dovecot-dict-sql-quota.conf |
| 486 | sieve_after = mysql:/etc/dovecot/sql/dovecot-dict-sql-sieve_after.conf |
| 487 | sieve_before = mysql:/etc/dovecot/sql/dovecot-dict-sql-sieve_before.conf |
| 488 | } |
| 489 | remote 127.0.0.1 { |
| 490 | disable_plaintext_auth = no |
| 491 | } |
| 492 | submission_host = postfix:588 |
| 493 | mail_max_userip_connections = 500 |
| 494 | service imap-postlogin { |
| 495 | executable = script-login /usr/local/bin/postlogin.sh |
| 496 | unix_listener imap-postlogin { |
| 497 | user = vmail |
| 498 | mode = 0660 |
| 499 | } |
| 500 | } |
| 501 | service stats { |
| 502 | unix_listener stats-writer { |
| 503 | mode = 0660 |
| 504 | user = vmail |
| 505 | } |
| 506 | } |
| 507 | imap_max_line_length = 2 M |
| 508 | #auth_cache_verify_password_with_worker = yes |
| 509 | #auth_cache_negative_ttl = 0 |
| 510 | #auth_cache_ttl = 30 s |
| 511 | #auth_cache_size = 2 M |
| 512 | service replicator { |
| 513 | process_min_avail = 1 |
| 514 | } |
| 515 | service aggregator { |
| 516 | fifo_listener replication-notify-fifo { |
| 517 | user = vmail |
| 518 | } |
| 519 | unix_listener replication-notify { |
| 520 | user = vmail |
| 521 | } |
| 522 | } |
| 523 | service replicator { |
| 524 | unix_listener replicator-doveadm { |
| 525 | mode = 0666 |
| 526 | } |
| 527 | } |
| 528 | replication_max_conns = 10 |
| 529 | doveadm_port = 12345 |
| 530 | replication_dsync_parameters = -d -l 30 -U -n INBOX |
| 531 | !include_try /etc/dovecot/extra.conf |
| 532 | !include_try /etc/dovecot/sogo-sso.conf |
| 533 | !include_try /etc/dovecot/shared_namespace.conf |
| 534 | default_client_limit = 10400 |
| 535 | default_vsz_limit = 1024 M |