dovecot.conf.erb 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.protocols(@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. <%= Dovecot::Conf.attribute(@conf, 'listen', '*, ::') %>
  25. # Base directory where to store runtime data.
  26. <%= Dovecot::Conf.attribute(@conf, 'base_dir', '/var/run/dovecot/') %>
  27. # Name of this instance. Used to prefix all Dovecot processes in ps output.
  28. <%= Dovecot::Conf.attribute(@conf, 'instance_name', 'dovecot') %>
  29. # Greeting message for clients.
  30. <%= Dovecot::Conf.attribute(@conf, 'login_greeting', 'Dovecot ready.') %>
  31. # Space separated list of trusted network ranges. Connections from these
  32. # IPs are allowed to override their IP addresses and ports (for logging and
  33. # for authentication checks). disable_plaintext_auth is also ignored for
  34. # these networks. Typically you'd specify your IMAP proxy servers here.
  35. <%= Dovecot::Conf.attribute(@conf, 'login_trusted_networks') %>
  36. # Space separated list of login access check sockets (e.g. tcpwrap)
  37. <%= Dovecot::Conf.attribute(@conf, 'login_access_sockets') %>
  38. # Show more verbose process titles (in ps). Currently shows user name and
  39. # IP address. Useful for seeing who are actually using the IMAP processes
  40. # (eg. shared mailboxes or if same uid is used for multiple accounts).
  41. <%= Dovecot::Conf.attribute(@conf, 'verbose_proctitle', false) %>
  42. # Should all processes be killed when Dovecot master process shuts down.
  43. # Setting this to "no" means that Dovecot can be upgraded without
  44. # forcing existing client connections to close (although that could also be
  45. # a problem if the upgrade is e.g. because of a security fix).
  46. <%= Dovecot::Conf.attribute(@conf, 'shutdown_clients', true) %>
  47. # If non-zero, run mail commands via this many connections to doveadm server,
  48. # instead of running them directly in the same process.
  49. <%= Dovecot::Conf.attribute(@conf, 'doveadm_worker_count', 0) %>
  50. # UNIX socket or host:port used for connecting to doveadm server
  51. <%= Dovecot::Conf.attribute(@conf, 'doveadm_socket_path', 'doveadm-server') %>
  52. # Space separated list of environment variables that are preserved on Dovecot
  53. # startup and passed down to all of its child processes. You can also give
  54. # key=value pairs to always set specific settings.
  55. <%= Dovecot::Conf.attribute(@conf, 'import_environment', 'TZ') %>
  56. ##
  57. ## Dictionary server settings
  58. ##
  59. # Dictionary can be used to store key=value lists. This is used by several
  60. # plugins. The dictionary can be accessed either directly or though a
  61. # dictionary server. The following dict block maps dictionary names to URIs
  62. # when the server is used. These can then be referenced using URIs in format
  63. # "proxy::<name>".
  64. <% if @conf['dict'].kind_of?(Hash) -%>
  65. dict {
  66. <% @conf['dict'].sort.each do |key, value| -%>
  67. <%= key %> = <%= Dovecot::Conf.value(value) %>
  68. <% end -%>
  69. }
  70. <% else -%>
  71. dict {
  72. #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  73. #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  74. }
  75. <% end -%>
  76. # Most of the actual configuration gets included below. The filenames are
  77. # first sorted by their ASCII value and parsed in that order. The 00-prefixes
  78. # in filenames are intended to make it easier to understand the ordering.
  79. !include conf.d/*.conf
  80. # A config file can also tried to be included without giving an error if
  81. # it's not found:
  82. !include_try local.conf