Page MenuHomePhorge

Wallace invitation policy error possibly because folder could not be selected
Open, LowPublic

Description

here is the error:

2018-12-21 16:38:11,828 pykolab.wallace DEBUG [3084] Searching folder u'Calendar/Meeting To Be Sat' for event 'B7E5784C7355B821ED38A45311BAE158-9A667762A1BB38BD'
2018-12-21 16:38:11,830 pykolab.wallace ERROR [3084] Module 'invitationpolicy' - Unknown error occurred; error('command SEARCH illegal in state AUTH, only allowed in states SELECTED',)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/wallace/modules.py", line 117, in execute
    return modules[name]['function'](*args, **kw)
  File "/usr/lib/python2.7/site-packages/wallace/module_invitationpolicy.py", line 372, in execute
    done = processor_func(itip_event, policy, recipient_email, sender_email, receiving_user)
  File "/usr/lib/python2.7/site-packages/wallace/module_invitationpolicy.py", line 543, in process_itip_reply
    (existing, master) = find_existing_object(itip_event['uid'], itip_event['type'], itip_event['recurrence-id'], receiving_user, True)
  File "/usr/lib/python2.7/site-packages/wallace/module_invitationpolicy.py", line 899, in find_existing_object
    res, data = imap.imap.m.search(None, '(UNDELETED HEADER SUBJECT "%s")' % (uid))
  File "/usr/lib64/python2.7/imaplib.py", line 639, in search
    typ, dat = self._simple_command(name, *criteria)
  File "/usr/lib64/python2.7/imaplib.py", line 1082, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python2.7/imaplib.py", line 837, in _command
    ', '.join(Commands[name])))
error: command SEARCH illegal in state AUTH, only allowed in states SELECTED

It turns out that folder is actually called:
'user/name/Calendar/Meeting To Be Sat @domain`
Notice space just before @, while in error log folder is called Calendar/Meeting To Be Sat (no space).
So possibly the problem is that wallace can't SELECT folder and moves forward in the code just because imaplib does not return exception and then error happens when it tries to SEARCH in not selected folder. I suppose we need to check if folder was actually selected or except that error and move forward. Also we should not trim spaces from folder names.

pykolab-0.8.10-1.1.el7.kolab_16.noarch
wallace-0.8.10-1.1.el7.kolab_16.noarch

Liutauras

Details

Ticket Type
Task

Event Timeline

vanmeeuwen lowered the priority of this task from Needs Triage to Low.Mar 22 2019, 11:33 AM
vanmeeuwen subscribed.

Folders should generally not have a trailing space, so this should be fixed at the input / form level.