Gmail – Prevent label from being applied

gmailgmail-filtersgmail-labels

How can I prevent GMail from applying certain labels to messages.

For example, I have a "Work" label and a "Home" label. Gmail is labeling some messages as both "Work" and "Home." How do I prevent this?

I have a filter that specifies "Work" when it comes to my work email address.
I have a filter that specifies "Home" when it comes to my personal email address.

How do I tell Gmail not to apply both labels to an email coming to one but not the other?

My filters are as follows:

Matches: to:(myname@myworkaddress.com)
Do this: Apply label "Work", Never send it to Spam

Matches: to:(mymickname@homesweethome.com)
Do this: Apply label "Home", Never send it to Spam

Also, as a note, I never receive emails sent to both my home and work email addresses.

Best Answer

I assume you create labels using a filter like "to:a@a.com". Your problem are presumably emails that are sent to both of your email addresses.

In order to avoid an email being labelled by both you can simple create a new filter set A', B' using a negation operator on one of the two:

A'="to:a@a.com"
B'="to:b@b.com" -"to:a@a.com"

So now messages that have the label A=A' applied will no longer have label B' applied. You can also refine your filter A' to exclude a few intersection matches.

On operators for Gmail filters read: How to use boolean AND and NOT operators in Gmail search