## ## Quota configuration. ## # Note that you also have to enable quota plugin in mail_plugins setting. # ## ## Quota limits ## plugin { quota = maildir:User quota quota_rule = *:storage=200M quota_rule2 = Trash:storage=+50M quota_grace = 10%% quota_max_mail_size = 25M quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" } plugin { quota = maildir:Shared quota:ns=shared/ quota_rule = *:storage=200M quota_max_mail_size = 25M quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" } ## ## 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 executed, 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. plugin { quota_warning = storage=50%% quota-warning 50 %u quota_warning2 = storage=80%% quota-warning 80 %u quota_warning2 = storage=90%% quota-warning 90 %u quota_warning3 = storage=95%% quota-warning 95 %u } # 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 /bin/quota-warning.sh # user = vmail unix_listener quota-warning { user = dovecot group = vmail mode = 0766 } } service quota-status { executable = quota-status -p postfix inet_listener { port = 12340 # You can choose any port you want } client_limit = 1 }