Badly messed up email filters in gmail. Any ideas of how to fix?

Posted by: tfabris

Badly messed up email filters in gmail. Any ideas of how to fix? - 13/08/2017 17:54

I just messed up my gmail organization real bad. Does anyone have any ideas how to fix this?

I have a lot of filters in Gmail, I use them to automatically apply labels (folders) to each of my emails. For instance I recently created a filter that says:

Code:
Matches: pemco
Do this: Apply label "2017-07-12 Rear-ended accident on 520"


That's just one example. I have many dozens of such filters. I have many filters which, based on certain keywords, keep all of my purchase receipts and shipping confirmations in one folder. I have filters which sort house maintenance information into one place. I have filters which sort tech support response messages. I have filters for band gig information, filters for convention info... I even have a filter for Empeg information. These filters and labels/folders have all worked well for years.

Here is an example of some other filters I have that already exist:

Code:
Matches: patient-message.com
Do this: Apply label "Medical"
Matches: swedish.org
Do this: Apply label "Medical"
Matches: [email protected]
Do this: Apply label "Medical"


So as you can see, I have several filters that add the "Medical" tag to certain emails I regularly get from medical providers. But here's what's important with this:
- I do not ONLY sort my mail with filters. For instance, I frequently apply labels to certain one-off messages by hand.
- For example I might get an email from someone and I might apply the label "Medical" to that email by hand, over the years.

So now I have a folder in Gmail called "Medical" which is fine, it has in it two different classes of message from over the years:
- Messages which I have filtered with filters into the "Medical" folder.
- Messages which I have hand-labeled with "Medical" myself in the "Medical" folder.

Today I got an email from a different medical provider system. It came from a different address than the others (it came from [email protected]). I added a new filter which I THOUGHT would have been this filter:

Code:
Matches: [email protected]
Do this: Apply label "Medical"


This should have worked fine. However, I must have made a mistake. Somehow it became a NEGATIVE filter. I don't know how that happened. The filter turned out to be this instead:

Code:
Matches: -{[email protected]}
Do this: Apply label "Medical"


Now here's the problem:
- Every email for all of my history forever is now in my "Medical" folder. All except the ones I was trying to get in there in the first place!

What I want to do:
- Remove the filter (easy, I know how to do that, just go into settings and delete the filter, I already did that).
- Undo the damage that the filter caused (this did not happen automatically when I removed the filter), and do so without losing my previous careful assignments of things which went into the "Medical" folder by hand.

I tried googling for this, and the only answers involved returning the filters themselves to their original state, but not how to perfectly undo the thing that the filter *did*.

I'm stumped as to how to fix this. Anyone have any ideas?

Posted by: tanstaafl.

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 13/08/2017 22:18

Originally Posted By: tfbris
Anyone have any ideas?
Perhaps Google Technical Support... surely Google has backup files, csn they roll you back to an earlier configuration?

tanstaafl.
Posted by: tfabris

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 14/08/2017 01:45

That's my hope as well, but I can't find a path to that for Gmail.

They don't seem to offer direct tech support for gmail.
Posted by: K447

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 14/08/2017 12:46

Originally Posted By: tfabris
That's my hope as well, but I can't find a path to that for Gmail.

They don't seem to offer direct tech support for gmail.
Do you pay Google for your Gmail service?
Posted by: tfabris

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 15/08/2017 19:32

Originally Posted By: K447
Do you pay Google for your Gmail service?


Just because it's their loss leader doesn't absolve them of the responsibility to support it. In fact, it's in their best interests to support it and make sure it works well: If it malfunctions for people, they won't buy google's other, paid services.
Posted by: Dignan

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 15/08/2017 21:23

I tried seeing if there were some sort of search that could bring up the emails that had a label applied on a certain date, but I can't seem to find one. There's no "date modified" criteria it seems.

The alternative is to...abandon them. I used labels and filters pretty obsessively in the early days. But then I switched to simply searching for everything I needed, and I haven't labelled anything since then.
Posted by: tfabris

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 15/08/2017 23:26

Thanks for looking for the date modified criteria. Too bad there isn't one, but that certainly would have done the job if it had existed.

I'm not ready to abandon my labels yet, but I did just bite the bullet, globally remove the label and redo everything.

It turns out that when you delete a label from the labeling system, it removes that label from every email (good) which is a great way to undo all the labels of the same type.

But it also turns the "Do this:" behavior in the filtering system to a blank (bad). So for the filters I'd previously set up for medical emails, I had to edit the filters and re-add a newly-created "Medical" label for those. Didn't take long, but was annoying to have to do.

Then I did some searches for the names of some hospitals and doctors I remembered and labeled those emails too. So at this point I've mostly done what I needed to do, but I'm sure there are some older emails that I've missed. Hopefully in the future, searches will work to help me find what I need to find.

Thanks!
Posted by: Dignan

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 16/08/2017 18:58

At least the existing filters you recreated can be re-run on all your existing mail. It won't help with the ones you marked manually, but it's something.
Posted by: Shonky

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 17/08/2017 08:35

Yeah I don't think there's much you can do really except remove the Medical label from them all and re-run your automatic Medical filter(s). As noted the manual ones will not be fixed though.

Do you have an offline (i.e. one that hasn't synced) copy via IMAP on Outlook or similar? If you keep it offline you at least have a copy of the manual ones that you might be able to export out and copy back in and then try and deduplicate. Not trivial and still no perfect most likely.
Posted by: tfabris

Re: Badly messed up email filters in gmail. Any ideas of how to fix? - 17/08/2017 16:24

I don't have an offline copy of my gmail anywhere, but little incidents like this make me think I should. Gmail's status bar says It's 6GB, so not *that* bad, considering I've been packratting for ... (*sorts mail by date*) ... 12 years. smile I'll look into how that can be accomplished.