##
## Quota configuration.
##

# Note that you also have to enable quota plugin in mail_plugins setting.
## <https://doc.dovecot.org/latest/core/plugins/quota.html>

##
## Quota limits
##

# Quota limits are set using "quota_rule" parameters. To get per-user quota
# limits, you can set/override them by returning "quota_rule" extra field
# from userdb. It's also possible to give mailbox-specific limits, for example
# to give additional 100 MB when saving to Trash:

#mail_plugins {
#  quota = yes
#}

#quota "User quota" {
#   storage_size = 1G
#}
#
#namespace inbox {
#   mailbox Trash {
#     quota_storage_extra = 100M
#   }
#}

##
## Quota warnings
##

# You can execute a given command when user exceeds a specified quota limit.
# Each quota root has separate limits. Only the command for the first
# exceeded limit is excecuted, so put the highest limit first.
# The commands are executed via script service by connecting to the named
# UNIX socket (quota-warning below).
# Note that % needs to be escaped as %%, otherwise "% " expands to empty.

#quota "User quota" {
#  warning warn-95 {
#    quota_storage_percentage = 95
#    execute quota-warning {
#      args = 95 %{user}
#    }
#  }
#  warning warn-80 {
#    quota_storage_percentage = 80
#    execute quota-warning {
#      args = 80 %{user}
#    }
#  }
#}

# Example quota-warning service. The unix listener's permissions should be
# set in a way that mail processes can connect to it. Below example assumes
# that mail processes run as vmail user. If you use mode=0666, all system users
# can generate quota warnings to anyone.
#service quota-warning {
#  executable = script /usr/local/bin/quota-warning.sh
#  user = dovecot
#  unix_listener quota-warning {
#    user = vmail
#  }
#}

##
## Quota backends
##

# Multiple backends are supported:
#   count: Default and recommended, quota driver tracks the quota internally within Dovecot's index files.
#   maildir: Maildir++ quota
#   fs: Read-only support for filesystem quota
#quota "User quota" {
#  driver = count
#}
