none
[E2010][EWSMA][C#] Odd caching behavior with deactivated mailboxes RRS feed

  • Question

  • I have a simple program that is retrieving older emails sent to me by a now-deactivated Exchange mailbox. Filtering by the sender's email address yields no results, but I found I was still able to retrieve specific emails using other filters (on subject, ID, etc.)

    When I run this the first time and view the Sender property on the EmailMessage instance, I get a RoutingType of "EX" and instead of an email address, the Legacy Exchange Distinguished Name (e.g. /o=Contoso/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=UserA).

    On subsequent calls however, the RoutingType becomes "SMTP" and I get the expected email address. The API will continue to return the SMTP address for some time but eventually (< 48 hours from what I've seen so far) it will start returning the EX addresses again.

    My question is: what is going on under the hood here? It appears that the information is being cached after the first request, but is there a way to bypass this and resolve the EX address string into an SMTP address?


    • Edited by Tarnt Karntington Monday, December 14, 2015 6:00 PM clarify legacyExchangeDN
    Monday, December 7, 2015 11:16 PM