After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686227 - EX addresses are returned for deleted mailboxes
EX addresses are returned for deleted mailboxes
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Calendar
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
: 689382 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-10-16 16:05 UTC by David Woodhouse
Modified: 2013-04-24 09:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ews patch (31.13 KB, patch)
2012-11-09 14:34 UTC, Milan Crha
committed Details | Review
proposed ews patch ][ (8.03 KB, patch)
2013-04-23 10:23 UTC, Milan Crha
committed Details | Review

Description David Woodhouse 2012-10-16 16:05:18 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.
Comment 1 David Woodhouse 2012-10-16 19:00:26 UTC
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.
Comment 2 David Woodhouse 2012-10-17 05:48:39 UTC
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?
Comment 3 Milan Crha 2012-11-09 10:14:12 UTC
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.
Comment 4 Milan Crha 2012-11-09 14:34:30 UTC
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 :)
Comment 5 Milan Crha 2012-11-09 14:40:02 UTC
Created commit 39da2c5 in ews master (3.7.2+)
Created commit 3a12976 in ews gnome-3-6 (3.6.2+)
Comment 6 David Woodhouse 2012-12-01 07:26:13 UTC
*** Bug 689382 has been marked as a duplicate of this bug. ***
Comment 7 David Woodhouse 2013-02-12 23:10:23 UTC
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.
Comment 8 Milan Crha 2013-04-23 07:49:11 UTC
*** Bug 689382 has been marked as a duplicate of this bug. ***
Comment 9 Milan Crha 2013-04-23 07:52:03 UTC
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.
Comment 10 Milan Crha 2013-04-23 10:23:18 UTC
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.
Comment 11 Milan Crha 2013-04-24 09:16:54 UTC
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+)