Menu

#5 GAL lookup is terrible

closed
nobody
None
5
2012-10-16
2009-09-28
Anonymous
No

The function "getSenderEmailAddress", for a mail received from an exchange server, will search the global address list (GAL) to find the SMTP address of the sender. Unfortunately, this does a linear search for the item, and on my poor little laptop, with a large GAL, freezes outlook while the hard drive thrashes for several minutes (almost makes the system useless, in fact, as all other paging activity slows down too.)

A better search algorithm would be nice to have (maybe sort by name first, then do a binary search?) As a temporary fix, checking the signature for PATTERN_SENDER_EMAIL and only doing the lookup if it exists avoids the issue if that keyword is not used.

Discussion

  • Nobody/Anonymous

    Waiting for my user account to be reunited with me...

    In the mean time, the following code will work to get the address book entry:

        Set exchAddressEntry = exchAddressEntries.Item(OriginalMail.SenderName)
        If exchAddressEntry.Name <> OriginalMail.SenderName Then Set exchAddressEntry = Nothing
    

    Seems to work for me on my US version of Outlook 2007, not sure how it'll work on international versions. I would expect it to work the same, though.

     
  • Nobody/Anonymous

    You can colapse the check in my previous comment that sets the entry to Nothing with the check in the original code that extracts the SMTP address. Really cleans up the code, and makes performance snappy (my GAL has 400K+ entries).

     
  • larsen255

    larsen255 - 2009-10-15

    fixed in rev 48. thx for the patch.

     

Anonymous
Anonymous

Add attachments
Cancel