Tuesday, July 28, 2009

Retroactive shift of spam email in unopened inboxes

As I was reading about this nice new automated-unsubscription feature on the official Gmail blog, I also opened a two year old post thanking Gmail users for hitting the "Report Spam" and "Not Spam" buttons (interesting to note how googler Brad Taylor has graduated from a Software Engineer to "Gmail Spam Czar" since then). An excerpt from the latter post follows:

"Reason #2: It helps the Gmail community at large (this includes you!). When you report spam, we compute all kinds of interesting things about the spammy message you reported and combine it with the information that other users are reporting about the same message or sender. When our automated system sees a lot of people marking a particular email as spam, it starts blocking similar emails pretty quickly."

The last sentence of the excerpt intrigued me. Why only start blocking similar emails? Why not move emails from inbox to spam folder retroactively, in cases where it is known that a user hasn't seen the emails? A simple algorithm explains this:
  1. An email arrives in 10 users' mailboxes
  2. Gmail initially feels that it's not spam
  3. The email is placed in these users' inboxes
  4. Five users hit the 'Report Spam' button
  5. Gmail now concludes that it's a spam mail
  6. Other 5 users haven't yet opened their inboxes
  7. Gmail quietly shifts the email to spam folder
  8. When these 5 users login, the mail is in the spam folder
  9. For them, Gmail's earth-shaking filters worked yet again
An improvement to the above algorithm can be made by replacing steps 7 and 8 with:
  • When they try to login, Gmail checks the status of the email
  • Most current status of the mail is that of a spam mail
  • Gmail shifts the email to the spam folder
  • When Gmail's UI loads, these users find the mail in spam folder
Similar retroactive actions can be taken for other purposes:
  • Shifting email from spam folder to inbox
  • Displaying a "potentially unsafe sender" warning
  • Blocking in-email hyperlinks as unsafe
  • Blocking images / attachments in an email

No comments:

Post a Comment