Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Google Apps for Domains to handle my personal email. I have the following filter configured:

Matches: to:(username@example.com)
Do this: Skip Inbox, Mark as read, Delete it

Here is the exported filter XML:

    <category term='filter'></category>
    <title>Mail Filter</title>
    <apps:property name='to' value='username@example.com'/>
    <apps:property name='shouldMarkAsRead' value='true'/>
    <apps:property name='shouldArchive' value='true'/>
    <apps:property name='shouldTrash' value='true'/>

Despite this rule, mail to the username@example.com address is not being matched by the filter. Here is one example headers of a mail that was not caught by the filter:

Delivered-To: username@example.com
Received: by with SMTP id i18csp10155qej;
        Sun, 30 Sep 2012 02:09:09 -0700 (PDT)
Received: by with SMTP id ri4mr32446176pbc.115.1348996149371;
        Sun, 30 Sep 2012 02:09:09 -0700 (PDT)
Return-Path: <b730@mail.tbb.com.tw>
Received: from mail.tbb.com.tw ([])
        by mx.google.com with SMTP id c5si10659paz.41.2012.;
        Sun, 30 Sep 2012 02:09:08 -0700 (PDT)
Received-SPF: neutral (google.com: is neither permitted nor denied by best guess record for domain of b730@mail.tbb.com.tw) client-ip=;
Authentication-Results: mx.google.com; spf=neutral (google.com: is neither permitted nor denied by best guess record for domain of b730@mail.tbb.com.tw) smtp.mail=b730@mail.tbb.com.tw
Received: By OpenMail Mailer;Sun, 30 Sep 2012 16:05:41 +0800 (CST)
From: "Loan Financial Private Company" <b730@mail.tbb.com.tw>
Reply-To: micheajoh@w.cn
Subject: Loan Financial Private Company
Message-ID: <1348992338.5369.b730@mail.tbb.com.tw>
Date: Sun, 30 Sep 2012 16:05:41 +0800 (CST)
MIME-Version: 1.0
Return-Path: b730@mail.tbb.com.tw
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: quoted-printable

Note that I have tens of other similar filters that do properly match mail per address. It is only this one address / filter combination that is failing to match mail.

To proactively address the obvious red herrings and ensure that the discussion remains focused: I am aware of the dangers of posting a live email address publicly. I am aware of Gmail's excellent spam filters. I am aware of the arguments against catch-all email addresses.

share|improve this question
up vote 5 down vote accepted

Gmail help says:

*Search on bcc: cannot retrieve messages on which you were blind carbon copied

You need to use the deliveredto: operator.

Search for messages within a particular email address in the Delivered-To line of the message header Example: deliveredto:username@gmail.com

Meaning: Any message with username@gmail.com in the Delivered-To: field of the message header (which can help you find messages forwarded from another account or ones sent to an alias).

share|improve this answer
Thank you Al‏‏‏‏! – dotancohen Apr 18 '13 at 11:39
While creating filter, deliveredto:username@gmail.com should be written in "Has the words" field. – Mukesh Chapagain Mar 2 '15 at 13:36

You need to match on Delivered-To SMTP header, check the below link on how to configure that.

GMail filtering on SMTP Headers

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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