mirror of
https://github.com/chatmail/relay.git
synced 2026-05-18 05:38:57 +00:00
run removal of inactive users daily
This commit is contained in:
@@ -4,6 +4,7 @@ import iniconfig
|
||||
|
||||
|
||||
def read_config(inipath, mail_basedir=None):
|
||||
assert Path(inipath).exists(), inipath
|
||||
cfg = iniconfig.IniConfig(inipath)
|
||||
params = cfg.sections["params"]
|
||||
if mail_basedir is None:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Remove old user accounts
|
||||
Remove inactive users
|
||||
"""
|
||||
|
||||
import shutil
|
||||
|
||||
@@ -8,7 +8,7 @@ mail_domain = {mail_domain}
|
||||
#
|
||||
|
||||
#
|
||||
# Restrictions on user addresses
|
||||
# Restrictions on user addresses
|
||||
#
|
||||
|
||||
# how many mails a user can send out per minute
|
||||
@@ -20,7 +20,7 @@ max_mailbox_size = 100M
|
||||
# days after which mails are unconditionally deleted
|
||||
delete_mails_after = 20
|
||||
|
||||
# days after which users without a login are deleted (database and mails)
|
||||
# days after which users without a login are deleted (database and mails)
|
||||
delete_inactive_users_after = 25
|
||||
|
||||
# minimum length a username must have
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from time import time as now
|
||||
|
||||
from chatmaild.doveauth import lookup_passdb
|
||||
from chatmaild.delete_inactive_users import delete_inactive_users
|
||||
from chatmaild.doveauth import lookup_passdb
|
||||
|
||||
|
||||
def test_remove_stale_users(db, example_config):
|
||||
|
||||
Reference in New Issue
Block a user