90-quota.conf.erb 2.3 KB

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