An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

November 18, 2007

Filter Messages from a Mailing List in Gmail

The new version of Gmail makes it easier to create filters for mailing list. If you select "filter messages like this" when you read a message from a mailing list, Gmail will filter the right messages using the listid: operator, that corresponds to the List-ID header. For example, listid:googlepress.googlegroups.com is the best way to find messages sent from the Google Press group. You should create filters that automatically label these messages, archive them or mark them as read.


Gmail also has a clever way to handle mail sent to a list you are subscribed to: it bypasses the inbox, but it's still available in Sent Mail or in other views. When you set a vacation responder, it won't be sent to mailing lists. If you don't want to read the next replies from a thread, you can ignore them by clicking on "Mute" in the "More actions" menu: all the replies will be archived.

{ Thanks, Hernan. }

22 comments:

  1. Were it should say 0 comments it now says 0+exp(pi*i)+ln(e) comments :P something wrong I guess??? And what the heck is pi doing there: 0 + exp(pi * i) + ln(e) = 0 actually... well its still strange

    ReplyDelete
  2. It's reaaally weird, now says "1+log(log(log(googol))/2)" instead of 1... Some Hackie boy maybe :P

    Cheers!

    ReplyDelete
  3. And if you want to "mute" a conversation, the 'm' key is a great shortcut. Mute will remove an email conversation thread from your view unless someone sends an email with you as a specific recipient. I use it all the time when I'm on a mailing list that is hotly debating something that I don't care about at all. :)

    ReplyDelete
  4. This reminds me that I am still waiting for a way to filter messages on other headers, mainly the "Delivered-To:". If you hear about that...

    ReplyDelete
  5. Re Patrick: that bothers me too. Previously I've set up a procmail filter to modify the subject of messages before I forward them from another account, and search for that token in the subject. That, however, has the great disadvantage that the marker stays in the subject if you reply to the message.

    Now I've changed the filter to add a list-id header instead, but I'd still like to have a way to search for any header.

    ReplyDelete
  6. Patrick:

    It doesn't seem to be common knowledge, but you can filter on Delivered-To. Just create a filter, and in the "Has the words" box, enter:

    deliveredto:user@domain.com

    ReplyDelete
  7. dwalters,

    I tried what you suggested but it just doesn't work...

    In the spam mails, I searched for a mail where my address doesn't appear in the details, asked for the original and collected a delivered-to field from there. I formated it as you suggested and performed a search in mail&spam&trash and it returned nothing.

    :-(

    ReplyDelete
  8. dwalters: I'd like to shake your hand, that trick is exactly what I needed to make forwarding multiple email accounts to gmail not suck!

    Patrick: here's what I did: Let's say I have an email address james.bond@blogger.com that forwards to james.bond+blogger@gmail.com. Then try sending a message BCC'ed to james.bond@blogger.com. When you get the e-mail in gmail, view its source (you can do this by clicking the little down arrow next to the time and selecting "show original"), and ensure that one of the first lines says Delivered-To: james.bond+blogger@gmail.com

    Now simply create a filter to match that. In the "Has the words" box, enter deliveredto:james.bond+blogger@gmail.com, and test the filter. Alternatively, I have had success just writing deliveredto:blogger

    ReplyDelete
  9. The way you suggest to do supposes you have predefined a forwarding using pluses. Also, it will not work if you try to search for a Delivered-To which is not the last (=top) one. Because in your setup, you have a precise forwarder set up, it's as if what you're actually searching for is a plain "To:" field.

    ReplyDelete
  10. Patrick, I've tried the deliveredto: search and it works for me too.
    Don't forget to include in:spam if you want to search through spam as it is excluded by default.

    ReplyDelete
  11. Mihai,

    As I wrote above, yes it works BUT only for the last e-mail address the message was delivered (generally your gmail address). You can't use this technique to filter based on a previous e-mail address the message went through (forwarded).

    Patrick

    ReplyDelete
  12. This is a good feature from google. At least what we will receive our just those from good press group

    ReplyDelete
  13. Patrick,

    You are right; it only checks the topmost header. I wish there was a way to check for the second to last mailbox the mail was delivered to.
    So as it stands now, if you just set up an email alias to forward to your gmail, there is no sure way of identifying it within gmail and labeling it unless the email address is explicitly present in the "To:" header.

    Sameer

    ReplyDelete
  14. dwalters, i just discovered your tip here--amazing! Thank you so much.

    ReplyDelete
  15. dwalters,
    I want to set up a mail distribution list - similar to what you would set up in Outlook.
    Is there a way to set it up in gmail ?

    ie. distrlist = a@gmail.com; b@gmail.com, etc.

    ReplyDelete
  16. How do you search for messages while filtering OUT anything that's from a mailing list?

    ReplyDelete
  17. "It doesn't seem to be common knowledge, but you can filter on Delivered-To..."

    Can't thank you enough for this tip, dwalters.

    ReplyDelete
  18. Gmail fails terribly when there's no List-ID or Mailing-List header on mailing lists (for instance, Majordomo lists such as all the OpenBSD ones). Would like to filter by List-Post in these cases, but don't see any way to, and Gmail doesn't identify them as mailing list messages.

    ReplyDelete
  19. gmail needs better filtering or a way to enable filtering on any header... beyond time

    ReplyDelete
  20. Great tip -thanks. Worked for me in decommissioning user accounts that have been compromised whilst still retaining the ability to catch-all.

    ReplyDelete
  21. Any suggestions on using Gmail "alias" feature with the '+' operator with google group subscriptions? I am also unable to receive updates from the subscribed Google Groups and since Google Groups doesn't recognized the aliased emails and therefore unable to manage my settings.

    ReplyDelete
  22. Also, if you want to automatically bump any topics you participated in to inbox, there is a (not straightforward) way to do this as well.
    Here is a short guide for it: http://www.amilkhanzada.com/2012/06/gmail-keeping-mailing-list-topics-you.html

    ReplyDelete