GNOME Bugzilla – Bug 686227
EX addresses are returned for deleted mailboxes
Last modified: 2013-04-24 09:17:06 UTC
My EWS calendar disappeared. Removing the folder-tree file always used to recreate it, and maybe removing it from the accounts list with gconf-editor. But I couldn't make it come back so I just deleted the account completely and recreated it. Now the calendar is resyncing from scratch.... but evo keeps saying '(evolution:3505): calendar-gui-WARNING **: gnome-cal.c:1184: Could not create the view: Timeout was reached', and evolution-calendar-factory appears to be off in the weeds, continually making slow ResolveNames requests for people who've left the company. Sometimes for the same person over and over again.
It's been almost three hours now, and the calendar still won't display. Evolution still just reports timeouts. After locking up and refusing to do anything for a minute or two.
Joy. Before it ever actually started working, I had to restart and now the calendars are missing from my list again. There's no EWS at all; just On This Computer / CalDAV / Contacts / On The Web. How do I make them come back?
I suppose you got the answer for comment #2 recently, it's basically bug #678466, thus let's use this for the repeated resolves. There is no caching for it currently, if the backend finds EX address instead of a SMTP, then it tries to resolve it.
Created attachment 228570 [details] [review] ews patch for evolution-ews; OK, first of all, EWS should not do anything on the main thread, especially time-expensive operations. This causes the timeouts. Then I added also a cache of ex_to_smtp addresses, thus there will be no retry during one synchronization call. The sync is now done synchronously, but in a dedicated thread, thus it doesn't block factory's main thread. By the way, it was great to write the sync completely asynchronously, I'm sorry to delete it, though you see that the code is less complex now :)
Created commit 39da2c5 in ews master (3.7.2+) Created commit 3a12976 in ews gnome-3-6 (3.6.2+)
*** Bug 689382 has been marked as a duplicate of this bug. ***
This still isn't working correctly. I'm running Fedora 18 with evo-ews 3.6.3 and still the calendar goes off into the weeds for hours making ResolveNames calls for the same people over and over again. That's after I manually kill and restart evolution-source-registry after joining the VPN, of course. Until I do that, my calendar doesn't work at all.
The above duplicate bug #689382 is about Mail component, where I introduced this in bug #679305, I didn't get that the EWS may return EX addresses only for people not in the directory any more, but it makes sense. I asked Mikhail to verify, and if he'll confirm, then I'll remove this code from evo-ews Calendar and Mail code.
Created attachment 242201 [details] [review] proposed ews patch ][ for evolution-ews; This simply drops all the ex_to_smtp code from calendar and camel, and replaces it with e_ews_item_util_strip_ex_address(), which takes an EX address and strips all but the last common name. It's not the exact name as used by the "non-deleted mailboxes", but it's quite close (exchange adds to the name some 3-letter code). I believe it's OK to use such broken address, when the mailbox got removed. Interesting is that the recipients has all the MAPI properties available, but the EWS protocol doesn't read from them.
OK, Mikhail confirmed that this happens for him for deleted mailboxes, thus I'm committing the above patch. Created commit f29c5a8 in ews master (3.9.1+) Created commit 63de071 in ews gnome-3-8 (3.8.2+)