I would like to apply a particular label to all incoming messages. Gmail filters apply to both outgoing and incoming messages. So I've added a condition that says Doesn't have from:me
. This prevents the filter from matching outgoing messages in Sent. However, it also (undesirably) prevents it from matching incoming messages that I send to myself or that someone else has sent to me “from” my own address. Is there a way to only exclude my own outgoing messages?
I’ve seen mention of using in:sent
and label:sent
, but when creating the filter Gmail warns against this saying that they aren’t applied yet at the time the filter is evaluated. I guess they are only for searching after the fact.
Best Answer
Use the condition "to:me" instead of "Doesn't have from:me". This will capture incoming mail and exclude outgoing mail unless you've sent it to yourself.
To include e-mails sent to a mailing list of which you are a recipient, you need to use the "deliveredto:" operator. We can take advantage of the fact that the
Has the words:
field accepts search operators. Leaving the other fields blank, put the following text in theHas the words:
box:{(to:YOU@gmail.com) (deliveredto:YOU@gmail.com)}
The inner parenthesis mean that the field is optional (e.g., the mail can beto:
this address OR it can bedeliveredto:
this address). This is what your filter should look like:I believe you only need "to:" in order to capture e-mails sent to yourself, although I'd have to test it more to be sure. Regardless, putting both should capture all incoming e-mail.