summaryrefslogtreecommitdiffstats
path: root/wallace/module_resources.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-05 07:14:13 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-05 07:14:13 -0500
commitb3afa468579586b62aee849779c89d0104c3d21e (patch)
tree750704c3599e1ca001f1130bdda0f7248c992de5 /wallace/module_resources.py
parentcfe5378af4eb9bbe6c210f85263c23842f6ca490 (diff)
downloadpykolab-b3afa468579586b62aee849779c89d0104c3d21e.tar.gz
Test handling of (some) invalid iTip messages to resources
Diffstat (limited to 'wallace/module_resources.py')
-rw-r--r--wallace/module_resources.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 302f276..ee63e85 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -206,6 +206,13 @@ def execute(*args, **kw):
# iTip events
resource_dns = resource_records_from_itip_events(itip_events, resource_recipient)
+ # check if resource attendees match the envelope recipient
+ if len(resource_dns) == 0:
+ log.info(_("No resource attendees matching envelope recipient %s, Reject message") % (resource_recipient))
+ reject(filepath)
+ return False
+
+
# Get the resource details, which includes details on the IMAP folder
resources = {}
for resource_dn in list(set(resource_dns)):