Using advanced search logic in Gmail filters
I was trying modify a filter to operate on emails that were sent to a particular address A or recieved from a particular address B. After entering the relevant information in the To: and From: text boxes I discovered that the filter conditions appeared to have a logical AND applied to them by default. Shock! Rage! Despair!
After throwing a short (but undeniably violent) tantrum, I tried using the advanced mail search operators I had come across while investigating the Multiple Inboxes lab feature, by appending additional logic (OR to:someotherguy ) to the condition in the From: text box.
It looks like the back end that collates the filter just takes the appropriate modifier for a field (from: in this case) and then just appends whatever is in the associated text box (someguy OR to:someotherguy) , so any additional search logic gets included in the filter. A bit like exploiting a buffer overflow. But in a nice way.