From a9a81bc6f0d8483c517b2c116471f034cd666bc1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 3 May 2016 23:56:56 +0200 Subject: mail quotas --- ymir.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ymir.nix') diff --git a/ymir.nix b/ymir.nix index 3585a5cc..78a82359 100644 --- a/ymir.nix +++ b/ymir.nix @@ -351,6 +351,7 @@ in rec { permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, + check_policy_service unix:policy, permit smtpd_sender_restrictions = @@ -400,6 +401,24 @@ in rec { separator = / inbox = yes } + + plugin { + quota = maildir:User quota + quota_rule = ?:storage=1GB + quota_rule2 = Trash:storage=+10%% + quota_status_overquota = "552 5.2.2 Mailbox is full" + } + + service quota-status { + executable = quota-status -p postfix + unix_listener /var/lib/postfix/queue/policy { + mode = 0660 + user = postfix + group = postfix + # You can choose any port you want + } + client_limit = 1 + } ''; }; security.pam.services.dovecot2.text = '' -- cgit v1.2.3