December 8, 2007
All My Email On Gmail Deleted?!
As you may know from the sentiments in our “Roundup” video series, I have a healthy dose of skepticism for Google. And while I have had a Gmail account for a couple of years now, I have only recently begun to use it in earnest. Despite my discomfort with Google’s unhealthy fixation on my personal data, the quality of the Gmail app was too compelling in the end. The fact that Google began offering Gmail as part of a suite of apps targeted at business did allay my fears somewhat: ironically it would seem I don’t trust Google to look out for the interests of individual consumers, but now that they’ve added business users to the mix I figure they must shoot straight: I don’t see them as champions of privacy, but trade secrets are a different matter, one with which Google can no doubt identify. In any case, you might say I was driven into Gmail’s arms by a spam problem which had grown to epic proportions.
So imagine my shock and horror this morning when I sat down to read email this morning, and discovered my usually stuffed inbox had only four emails in it. I immediately started scanning for stories of the same. There were some stories out there, however, none were all that current. Could my account have been singled out as having violated some obscure policy? There was no notice from Google to indicate any such thing.
The cause of this deletion scare began to come clear as I was reading through some of the labels which still had emails. In fact I noticed that all my labels still contained their emails. And then I noticed that all the emails I was seeing had acquired a label which would not ordinarily apply. I checked that label, and found, sure enough, all my emails were there. It was starting to look like a filter problem.
After looking over the filter which labeled and archived my tech-related newsletters, I did some experimenting around and discovered a quirk: in certain situations, Gmail recognizes the minus sign as a special character which signifies negation, i.e. “NOT”. This makes perfect sense if you want to create a filter for all emails except those from bob@example.com.

Note the “Also apply” checkbox for this filter:
You have to be careful once you decide to negate more than one email in the “From” criteria, of course. Since an email can only be from one sender, any filter which negates two patterns joined by an “OR” will automatically catch all emails.

This, however, is not the gotcha which got my inbox cleared. What got me was a minus sign in conjunction with a wildcard. Let’s say that you get several email newsletter from the Bar Company. For whatever, reason, they send you emails from multiple domains: announcements@foo-bar.tld and deals@baz-bar.tld. My problematic pattern was something like this:

So apparently Gmail’s filters are interpreting *-bar.tld exactly the same way it would interpret -*bar.tld, which is to say, “match everything which is NOT like *bar.tld right? Wrong. When I tried the pattern below,

I got another surprising result:

So in English, “match anything which does NOT match *bar.tld“. In my inbox, that would be all emails. Yet this pattern matches none of them. Weird.
In any case I’m glad all my email wasn’t actually deleted.
Powered by ScribeFire.
Filed by Joel at 11:18 am under Web Marketing
No Comments
1 Comment