dovecot.conf.erb 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ## Dovecot configuration file
  2. # If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
  3. # "doveconf -n" command gives a clean output of the changed settings. Use it
  4. # instead of copy&pasting files when posting to the Dovecot mailing list.
  5. # '#' character and everything after it is treated as comments. Extra spaces
  6. # and tabs are ignored. If you want to use either of these explicitly, put the
  7. # value inside quotes, eg.: key = "# char and trailing whitespace "
  8. # Default values are shown for each setting, it's not required to uncomment
  9. # those. These are exceptions to this though: No sections (e.g. namespace {})
  10. # or plugin settings are added by default, they're listed only as examples.
  11. # Paths are also just examples with the real defaults being based on configure
  12. # options. The paths listed here are for configure --prefix=/usr
  13. # --sysconfdir=/etc --localstatedir=/var
  14. # Protocols we want to be serving.
  15. <% unless @protocols.nil? -%>
  16. protocols = <%= Dovecot::Conf.value(@protocols) %>
  17. <% else -%>
  18. #protocols = imap pop3 lmtp
  19. <% end -%>
  20. # A comma separated list of IPs or hosts where to listen in for connections.
  21. # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
  22. # If you want to specify non-default ports or anything more complex,
  23. # edit conf.d/master.conf.
  24. <% if @conf['listen'] -%>
  25. listen = <%= @conf['listen'] %>
  26. <% else -%>
  27. #listen = *, ::
  28. <% end -%>
  29. # Base directory where to store runtime data.
  30. <% unless @conf['base_dir'].nil? -%>
  31. base_dir = <%= Dovecot::Conf.value(@conf['base_dir']) %>
  32. <% else -%>
  33. #base_dir = /var/run/dovecot/
  34. <% end -%>
  35. # Name of this instance. Used to prefix all Dovecot processes in ps output.
  36. <% unless @conf['instance_name'].nil? -%>
  37. instance_name = <%= Dovecot::Conf.value(@conf['instance_name']) %>
  38. <% else -%>
  39. #instance_name = dovecot
  40. <% end -%>
  41. # Greeting message for clients.
  42. <% unless @conf['login_greeting'].nil? -%>
  43. login_greeting = <%= Dovecot::Conf.value(@conf['login_greeting']) %>
  44. <% else -%>
  45. #login_greeting = Dovecot ready.
  46. <% end -%>
  47. # Space separated list of trusted network ranges. Connections from these
  48. # IPs are allowed to override their IP addresses and ports (for logging and
  49. # for authentication checks). disable_plaintext_auth is also ignored for
  50. # these networks. Typically you'd specify your IMAP proxy servers here.
  51. <% unless @conf['login_trusted_networks'].nil? -%>
  52. login_trusted_networks = <%= Dovecot::Conf.value(@conf['login_trusted_networks']) %>
  53. <% else -%>
  54. #login_trusted_networks =
  55. <% end -%>
  56. # Space separated list of login access check sockets (e.g. tcpwrap)
  57. <% unless @conf['login_access_sockets'].nil? -%>
  58. login_access_sockets = <%= Dovecot::Conf.value(@conf['login_access_sockets']) %>
  59. <% else -%>
  60. #login_access_sockets =
  61. <% end -%>
  62. # Show more verbose process titles (in ps). Currently shows user name and
  63. # IP address. Useful for seeing who are actually using the IMAP processes
  64. # (eg. shared mailboxes or if same uid is used for multiple accounts).
  65. <% unless @conf['verbose_proctitle'].nil? -%>
  66. verbose_proctitle = <%= Dovecot::Conf.value(@conf['verbose_proctitle']) %>
  67. <% else -%>
  68. #verbose_proctitle = no
  69. <% end -%>
  70. # Should all processes be killed when Dovecot master process shuts down.
  71. # Setting this to "no" means that Dovecot can be upgraded without
  72. # forcing existing client connections to close (although that could also be
  73. # a problem if the upgrade is e.g. because of a security fix).
  74. <% unless @conf['shutdown_clients'].nil? -%>
  75. shutdown_clients = <%= Dovecot::Conf.value(@conf['shutdown_clients']) %>
  76. <% else -%>
  77. #shutdown_clients = yes
  78. <% end -%>
  79. # If non-zero, run mail commands via this many connections to doveadm server,
  80. # instead of running them directly in the same process.
  81. <% unless @conf['doveadm_worker_count'].nil? -%>
  82. doveadm_worker_count = <%= Dovecot::Conf.value(@conf['doveadm_worker_count']) %>
  83. <% else -%>
  84. #doveadm_worker_count = 0
  85. <% end -%>
  86. # UNIX socket or host:port used for connecting to doveadm server
  87. <% unless @conf['doveadm_socket_path'].nil? -%>
  88. doveadm_socket_path = <%= Dovecot::Conf.value(@conf['doveadm_socket_path']) %>
  89. <% else -%>
  90. #doveadm_socket_path = doveadm-server
  91. <% end -%>
  92. # Space separated list of environment variables that are preserved on Dovecot
  93. # startup and passed down to all of its child processes. You can also give
  94. # key=value pairs to always set specific settings.
  95. <% unless @conf['import_environment'].nil? -%>
  96. import_environment = <%= Dovecot::Conf.value(@conf['import_environment']) %>
  97. <% else -%>
  98. #import_environment = TZ
  99. <% end -%>
  100. ##
  101. ## Dictionary server settings
  102. ##
  103. # Dictionary can be used to store key=value lists. This is used by several
  104. # plugins. The dictionary can be accessed either directly or though a
  105. # dictionary server. The following dict block maps dictionary names to URIs
  106. # when the server is used. These can then be referenced using URIs in format
  107. # "proxy::<name>".
  108. <% if @conf['dict'].kind_of?(Hash) -%>
  109. dict {
  110. <% @conf['dict'].each do |key, value| -%>
  111. <%= key %> = <%= Dovecot::Conf.value(value) %>
  112. <% end -%>
  113. }
  114. <% else -%>
  115. dict {
  116. #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  117. #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  118. }
  119. <% end -%>
  120. # Most of the actual configuration gets included below. The filenames are
  121. # first sorted by their ASCII value and parsed in that order. The 00-prefixes
  122. # in filenames are intended to make it easier to understand the ordering.
  123. !include conf.d/*.conf
  124. # A config file can also tried to be included without giving an error if
  125. # it's not found:
  126. !include_try local.conf