You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

102 lines
3.0 KiB

  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. # LDA/LMTP allows saving the last mail to bring user from under quota to
  17. # over quota, if the quota doesn't grow too high. Default is to allow as
  18. # long as quota will stay under 10% above the limit. Also allowed e.g. 10M.
  19. #quota_grace = 10%%
  20. # Quota plugin can also limit the maximum accepted mail size.
  21. #quota_max_mail_size = 100M
  22. }
  23. ##
  24. ## Quota warnings
  25. ##
  26. # You can execute a given command when user exceeds a specified quota limit.
  27. # Each quota root has separate limits. Only the command for the first
  28. # exceeded limit is executed, so put the highest limit first.
  29. # The commands are executed via script service by connecting to the named
  30. # UNIX socket (quota-warning below).
  31. # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
  32. plugin {
  33. #quota_warning = storage=95%% quota-warning 95 %u
  34. #quota_warning2 = storage=80%% quota-warning 80 %u
  35. }
  36. # Example quota-warning service. The unix listener's permissions should be
  37. # set in a way that mail processes can connect to it. Below example assumes
  38. # that mail processes run as vmail user. If you use mode=0666, all system users
  39. # can generate quota warnings to anyone.
  40. service quota-status {
  41. executable = /usr/lib/dovecot/quota-status -p postfix
  42. unix_listener /var/spool/postfix/private/quota-status {
  43. user = postfix
  44. }
  45. }
  46. plugin {
  47. quota_status_success = DUNNO
  48. quota_status_nouser = DUNNO
  49. quota_status_overquota = "552 5.2.2 Mailbox is over quota / Mailbox ist voll"
  50. }
  51. ##
  52. ## Quota backends
  53. ##
  54. # Multiple backends are supported:
  55. # dirsize: Find and sum all the files found from mail directory.
  56. # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
  57. # dict: Keep quota stored in dictionary (eg. SQL)
  58. # maildir: Maildir++ quota
  59. # fs: Read-only support for filesystem quota
  60. plugin {
  61. #quota = dirsize:User quota
  62. quota = maildir:User quota
  63. #quota_rule = *:bytes=1000
  64. #quota = dict:User quota::proxy::quota
  65. #quota = fs:User quota
  66. }
  67. # Multiple quota roots are also possible, for example this gives each user
  68. # their own 100MB quota and one shared 1GB quota within the domain:
  69. plugin {
  70. #quota = dict:user::proxy::quota
  71. #quota2 = dict:domain:%d:proxy::quota_domain
  72. #quota_rule = *:storage=102400
  73. #quota2_rule = *:storage=1048576
  74. }
  75. plugin {
  76. quota_warning = storage=95%% quota-warning 95 %u
  77. quota_warning2 = storage=80%% quota-warning 80 %u
  78. }
  79. service quota-warning {
  80. executable = script /usr/local/bin/quota-warning.sh
  81. unix_listener quota-warning {
  82. group = dovecot
  83. mode = 0660
  84. }
  85. }