1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-28 03:56:43 +02:00

Finish storing the user quota to redis

This commit is contained in:
kaiyou 2018-04-21 17:19:44 +02:00
parent 80893be68b
commit 7f0447514c
2 changed files with 10 additions and 7 deletions

View File

@ -260,7 +260,7 @@ class User(Base, Email):
@property
def quota_bytes_used(self):
return quota.get(self.email) or 0
return quota.get(self.email + "/quota/storage") or 0
scheme_dict = {'SHA512-CRYPT': "sha512_crypt",
'SHA256-CRYPT': "sha256_crypt",

View File

@ -5,7 +5,6 @@ log_path = /dev/stderr
protocols = imap pop3 lmtp sieve
postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
hostname = {{ HOSTNAMES.split(",")[0] }}
mail_plugins = $mail_plugins quota quota_clone
submission_host = front
service dict {
@ -31,6 +30,9 @@ mail_gid = mail
mail_privileged_group = mail
mail_access_groups = mail
maildir_stat_dirs = yes
mailbox_list_index = yes
mail_vsize_bg_after_count = 100
mail_plugins = $mail_plugins quota quota_clone
namespace inbox {
inbox = yes
@ -52,6 +54,12 @@ namespace inbox {
}
}
plugin {
quota = count:User quota
quota_vsizes = yes
quota_clone_dict = redis:host={{ REDIS_ADDRESS }}:port=6379:db=1
}
###############
# Authentication
###############
@ -117,11 +125,6 @@ service lmtp {
}
}
plugin {
quota = maildir:User quota
quota_clone_dict = redis:host={{ REDIS_ADDRESS }}:db=1
}
###############
# Filtering