90-quota.conf.erb 2.2 KB

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