summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
Diffstat (limited to 'wallace')
-rw-r--r--wallace/module_resources.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 9376749..89b5544 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -442,14 +442,15 @@ def expunge_resource_calendar(mailbox):
"""
global imap
+ days = int(conf.get('wallace', 'resource_calendar_expire_days', 100))
+ now = datetime.datetime.now(tzlocal())
+ expire_date = now - datetime.timedelta(days=days)
+
log.debug(
- _("Expunge events in resource folder %r") % (mailbox),
+ _("Expunge events in resource folder %r older than %d days") % (mailbox, days),
level=8
)
- now = datetime.datetime.now(tzlocal())
- expire_date = now - datetime.timedelta(days=100)
-
# might raise an exception, let that bubble
targetfolder = imap.folder_quote(mailbox)
imap.set_acl(targetfolder, conf.get(conf.get('kolab', 'imap_backend'), 'admin_login'), "lrswipkxtecda")