Monday, August 24, 2009

Clarification on the iPhone Spotlight email issue

Earlier today, I posted about the ability to find previously deleted emails using the Spotlight search on the iPhone, adding to the already intense swarm of news surrounding this issue. My findings were that, by ensuring your trash folder was emptied and refreshed, the problem appeared to be solved.

However, many of you responded indicating that this did not work for you, and that you were still seeing cached messages. Then Cult of Mac posted an update to their original piece, suggesting that the problem was more specific to POP accounts. Although I had tested both POP and IMAP accounts with similar results, I decided to investigate further.

First, to clarify: The problem here is *not* with Spotlight caching the contents of your email, as many have suggested. Spotlight simply indexes the available content on your phone, and logs a pointer to it. When you tap a search result, it opens the associated application and tells that app to view the content. In this case, it sees an email message and asks Mail.app to open it, which it does, because Mail.app still has the message content stored locally. Secondly, this appears to be specific to POP accounts. On IMAP or Exchange accounts, deleted email messages do appear in Spotlight results until the trash folder is emptied, as described in my earlier post.

I created a fresh account and configured it for POP access, then downloaded the mail. Searching spotlight, I could see the message I was looking for. I then went back to the message and deleted it, and that's where the fun starts. I conducted this same test multiple times, and found that sometimes, the message would now show up in Spotlight twice, one result opened the message, intact, with the Inbox listed as the folder to return to; the other displaying a message in the trash folder, but with an error displaying the body of the message. Other times, I would only see one result, pointed directly to the trash.



So I would then attempt to delete the message from the trash folder, which also yielded mixed results. In most cases, the message was still indeed visible from Spotlight. On the messages which had previously shown up twice, then tapping the search result would cause the message to display normally, but show that it was in the inbox. On other messages, it was more interesting, as the message would sometimes appear in the trash, and sometimes in a "Deleted Items" folder, and sometimes Mail.app would crash when trying to display the message. On one occasion, however, the message did disappear from the Spotlight results as expected, so it seems that the exact outcome varies from occasion to occasion.

Contrary to my previous opinion, this is definitely a bug, and some users have even reported that Spotlight is turning up a history of ALL of their deleted messages, not just those that were recently deleted. For those who are experiencing this problem, there is good news and bad news. The good news is that the problem appears to be completely fixed in iPhone OS 3.1. That means the bad news, of course, is we have no idea when exactly the fix will be available publicly or if Apple is considering releasing an interim 3.0.2 update to address the issue. Further complicating matters, aside from deleting and recreating the mail account on your phone, there doesn't appear to be any workaround to preventing old messages from the Spotlight results until a software update addressing the issue becomes available.

No comments: