I am not able to access work email (Exchange) on my mobile phone due to corporate policy.

Because of that I forward copies of those messages to my Gmail account.

The forwarded messages are all received in Gmail with "FW:" prepended to their subjects.

In Gmail I would like to organize these messages using labels tied to the sender.

For example, if the message contains From: john, doe <[email protected]> I would like to label it john doe.

I have encountered the following problem:

  1. Including From: in the SEARCH causes Gmail to look at the sender address which is always my corporate address since I'm forwarding them therefore a match isn't made.
  2. I would like to label only messages that start with the search string and not ones that contain it further down to avoid matching messages that are actually responses to messages they originally sent.

Is this possible with Gmail filters?

If not, is there a script that can do this job?

1 Answer 1


Have you looked at having Gmail retrieve the mail from Outlook rather than forwarding it from Outlook? Look into Gmailify which allows Gmail to access your Outlook account.

Here are the setup instructions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.