Being a boblycat in today's society is a bit like being Jesus. So
much hardship and pain, but it's all worth it when your peers come to
huggle and molest you when you score the winning goal!!

You are hereBlogs / karltk's blog / Filtering on List-Id in Gmail

Filtering on List-Id in Gmail


One of my biggest gripes about gmail has been its rather infantile filtering capabilities. I've used procmail quite heavily for many years, so functionality-wise, I'm perhaps a bit spoilt.

Recently, however, I discovered that the Has the words field in the filter editor apparently supports a keyword called listid. I've not been able to verify that this actually expands to the various forms of List-Id headers, but at least it worked for all the lists I wanted to filter.

An example might clarify. Say I want to filter the Stratego CVS list, which has the following mail header:

List-Id: CVS notifications for Stratego and XT repositories <stratego-cvs.cs.uu.nl>


I entered the following in Gmail's Has the words field:

listid: stratego-cvs.cs.uu.nl



This seemed to do the trick.

You might wonder why using List-Id would be necessary since most lists use a [list-name] prefix anyway. In many instances, I get a reply that's both to my own address with a Cc to the list. This effectively provides me with two e-mails. I want to have the list-mail placed in the list, and the one address directly to me in my Inbox. Call me neurotic, but I'm a bit particular about this.

Another reason why List-Id is necessary for me, is the Apache harmony-dev list. This list uses many different [xx] prefixes, such as [classlib], [general], [build], depending on which service generated the message. I'd hate to maintain multiple filters for this case.