All 10 entries tagged Gnu
View all 13 entries tagged Gnu on Warwick Blogs | View entries tagged Gnu at Technorati | There are no images tagged Gnu on this blog
May 23, 2007
Procmail & list–id headers
I stole and modified Sam Hocevar’s procmail rules for generic Debian mailing lists – removing one call to sed, and improving the efficiency of the regexes slightly. (Readability may have suffered.) Additionally, I made sure it caught mail about debconf.
:0
* ^List-Id: .*<\/[-a-z0-9]*\.lists.*\.deb(ian|conf)\.org>
{
NAME=`echo "${MATCH}" | sed 's/^debian-//;
s/\.lists.*\.deb\(ian\|conf\)\.org>$//'`
:0
FOSS/Debian/${NAME}
}
Similarly for GNOME:
:0
* ^List-Id: .*<\/[-a-z0-9]*\.gnome\.org>
{
NAME=`echo "${MATCH}" | sed 's/\.gnome\.org>$//'`
:0
FOSS/GNOME/${NAME}
}
And for GNU (and nongnu.org):
:0
* ^List-Id: .*<\/[-a-z0-9]*\.(non)*gnu\.org>
{
NAME=`echo "${MATCH}" | sed 's/\.\(non\)*gnu\.org>$//'`
:0
FOSS/GNU/${NAME}
}
This removes the need for a lot of individual rules in the procmailrc.
I’m idly wondering whether these rules can be generalised yet further, so that any mail with a List-Id header gets filtered into an appropriate inbox. In the meantime, I can subscribe to lists from the Big Three with impunity. Bugzilla email still needs work.
Please wait - comments are loading