90-quota.conf.erb 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Generated by Chef
  2. ##
  3. ## Quota configuration.
  4. ##
  5. # Note that you also have to enable quota plugin in mail_plugins setting.
  6. # <doc/wiki/Quota.txt>
  7. <% if @plugins.has_key?('quota') and @plugins['quota'].kind_of?(Hash) -%>
  8. <%= Dovecot::Conf.plugin('quota', @plugins['quota']) %>
  9. <% else -%>
  10. ##
  11. ## Quota limits
  12. ##
  13. # Quota limits are set using "quota_rule" parameters. To get per-user quota
  14. # limits, you can set/override them by returning "quota_rule" extra field
  15. # from userdb. It's also possible to give mailbox-specific limits, for example
  16. # to give additional 100 MB when saving to Trash:
  17. plugin {
  18. #quota_rule = *:storage=1G
  19. #quota_rule2 = Trash:storage=+100M
  20. }
  21. ##
  22. ## Quota warnings
  23. ##
  24. # You can execute a given command when user exceeds a specified quota limit.
  25. # Each quota root has separate limits. Only the command for the first
  26. # exceeded limit is excecuted, so put the highest limit first.
  27. # The commands are executed via script service by connecting to the named
  28. # UNIX socket (quota-warning below).
  29. # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
  30. plugin {
  31. #quota_warning = storage=95%% quota-warning 95 %u
  32. #quota_warning2 = storage=80%% quota-warning 80 %u
  33. }
  34. # Example quota-warning service. The unix listener's permissions should be
  35. # set in a way that mail processes can connect to it. Below example assumes
  36. # that mail processes run as vmail user. If you use mode=0666, all system users
  37. # can generate quota warnings to anyone.
  38. #service quota-warning {
  39. # executable = script /usr/local/bin/quota-warning.sh
  40. # user = dovecot
  41. # unix_listener quota-warning {
  42. # user = vmail
  43. # }
  44. #}
  45. ##
  46. ## Quota backends
  47. ##
  48. # Multiple backends are supported:
  49. # dirsize: Find and sum all the files found from mail directory.
  50. # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
  51. # dict: Keep quota stored in dictionary (eg. SQL)
  52. # maildir: Maildir++ quota
  53. # fs: Read-only support for filesystem quota
  54. plugin {
  55. #quota = dirsize:User quota
  56. #quota = maildir:User quota
  57. #quota = dict:User quota::proxy::quota
  58. #quota = fs:User quota
  59. }
  60. # Multiple quota roots are also possible, for example this gives each user
  61. # their own 100MB quota and one shared 1GB quota within the domain:
  62. plugin {
  63. #quota = dict:user::proxy::quota
  64. #quota2 = dict:domain:%d:proxy::quota_domain
  65. #quota_rule = *:storage=102400
  66. #quota2_rule = *:storage=1048576
  67. }
  68. <% end -%>