make quota work

This commit is contained in:
holger krekel
2023-10-15 19:14:18 +02:00
committed by missytake
parent 3c57155c40
commit 48d890ee82
3 changed files with 27 additions and 12 deletions

View File

@@ -4,11 +4,14 @@ protocols = imap lmtp
auth_mechanisms = plain auth_mechanisms = plain
auth_verbose = yes mail_plugins = quota
auth_debug = yes mail_debug = yes
auth_debug_passwords = yes
auth_verbose_passwords = plain # uncomment this if you want to debug authentication and user creation
auth_cache_size = 100M #auth_verbose = yes
#auth_debug = yes
#auth_debug_passwords = yes
#auth_verbose_passwords = plain
# Authentication for system users. # Authentication for system users.
passdb { passdb {
@@ -60,13 +63,28 @@ mail_privileged_group = vmail
# Enable IMAP COMPRESS (RFC 4978). # Enable IMAP COMPRESS (RFC 4978).
# <https://datatracker.ietf.org/doc/html/rfc4978.html> # <https://datatracker.ietf.org/doc/html/rfc4978.html>
protocol imap { protocol imap {
mail_plugins = $mail_plugins imap_zlib mail_plugins = $mail_plugins imap_zlib imap_quota
}
protocol lmtp {
mail_plugins = $mail_plugins sieve quota
} }
plugin { plugin {
imap_compress_deflate_level = 6 imap_compress_deflate_level = 6
} }
plugin {
# for now we define static quota-rules for all users
quota = maildir:User quota
quota_rule = *:storage=100M
quota_max_mail_size=30M
quota_grace = 0
quota_over_flag_value = TRUE
}
service lmtp { service lmtp {
user=vmail user=vmail

View File

@@ -2,13 +2,10 @@
## Dovecot goals/steps ## Dovecot goals/steps
2. (holger) per-user storage quota (adaptive) - automatic expiry of messages older than M days
a) define a static 100MB per-user quota
3. automatic expiry of messages older than M days
- delete unconditionally messages older than 40 days - delete unconditionally messages older than 40 days
4. limit: max-connections per account - limit: configure max-connections per account
## Filtermail ## Filtermail

View File

@@ -7,7 +7,7 @@ domain = os.environ.get("CHATMAIL_DOMAIN", "c3.testrun.org")
print("connecting") print("connecting")
conn = imaplib.IMAP4_SSL(domain) conn = imaplib.IMAP4_SSL(domain)
print("logging in") print("logging in")
conn.login(f"measure{time.time()}", "pass") conn.login(f"imapcapa", "pass")
status, res = conn.capability() status, res = conn.capability()
for capa in sorted(res[0].decode().split()): for capa in sorted(res[0].decode().split()):
print(capa) print(capa)