6

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

Matches: to:([email protected])
Do this: Skip Inbox, Mark as read, Delete it

Here is the exported filter XML:

<entry>
    <category term='filter'></category>
    <title>Mail Filter</title>
    <id>tag:mail.google.com,2008:filter:1348992826412</id>
    <updated>2012-09-30T08:16:38Z</updated>
    <content></content>
    <apps:property name='to' value='[email protected]'/>
    <apps:property name='shouldMarkAsRead' value='true'/>
    <apps:property name='shouldArchive' value='true'/>
    <apps:property name='shouldTrash' value='true'/>
</entry>

Despite this rule, mail to the [email protected] 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: [email protected]
Received: by 10.49.35.178 with SMTP id i18csp10155qej;
        Sun, 30 Sep 2012 02:09:09 -0700 (PDT)
Received: by 10.68.225.68 with SMTP id ri4mr32446176pbc.115.1348996149371;
        Sun, 30 Sep 2012 02:09:09 -0700 (PDT)
Return-Path: <[email protected]>
Received: from mail.tbb.com.tw ([210.202.75.124])
        by mx.google.com with SMTP id c5si10659paz.41.2012.09.30.02.09.07;
        Sun, 30 Sep 2012 02:09:08 -0700 (PDT)
Received-SPF: neutral (google.com: 210.202.75.124 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=210.202.75.124;
Authentication-Results: mx.google.com; spf=neutral (google.com: 210.202.75.124 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Received: By OpenMail Mailer;Sun, 30 Sep 2012 16:05:41 +0800 (CST)
From: "Loan Financial Private Company" <[email protected]>
Reply-To: [email protected]
Subject: Loan Financial Private Company
Message-ID: <[email protected]>
Date: Sun, 30 Sep 2012 16:05:41 +0800 (CST)
MIME-Version: 1.0
Return-Path: [email protected]
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.

4 Answers 4

6

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:[email protected]

Meaning: Any message with [email protected] 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).

1
1

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

GMail filtering on SMTP Headers

1

To add to the already great answers, you can also use negative filters. For instance to filter the messages where you're in bcc only :

from:[email protected] -cc:[email protected] -to:[email protected] 

Nicely selects the mails where you are bcc, since this is the only one option left.

But this doesn't work when you send a mail to yourself in bcc within the same Gmail account, Gmail search includes it in "to:" field ???

Anyway, I found this pretty useful to filter mails where I add a bcc: copy to myself on an "archival" Gmail account.

0

Another version thanks to Joel.O.

I modified Joel.O's answer and used:

-to:me -cc:me -in:sent

And that worked for me.

Your Answer

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

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