Adding NetBSD Mailing List Labels In Procmail

Category: NetBSD Tags: , ,

Here is a portion of my .procmailrc file that adds labels to all email messages that are NetBSD mailing list related. In a previous post (Mutt, Procmail, GnuPG, and Postfix MX) I showed how I display that label on the subject line, similar to Google Mail webapp labels.

# coverity-updates
:0fhw
* ^List-Id: coverity-updates.*
| /usr/pkg/bin/formail -I "X-Label: coverity-updates"

# current-users
:0fhw
* ^List-Id: current-users.*
| /usr/pkg/bin/formail -I "X-Label: current-users"

# netbsd-advocacy
:0fhw
* ^List-Id: netbsd-advocacy.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-advocacy"

# netbsd-announce
:0fhw
* ^List-Id: netbsd-announce.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-announce"

# netbsd-bugs
:0fhw
* ^List-Id: netbsd-bugs.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-bugs"

# netbsd-docs
:0fhw
* ^List-Id: netbsd-docs.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-docs"

# netbsd-ports
:0fhw
* ^List-Id: netbsd-ports.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-ports"

# netbsd-users
:0fhw
* ^List-Id: netbsd-users.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-users"

# pkgsrc-bugs
:0fhw
* ^List-Id: pkgsrc-bugs.*
| /usr/pkg/bin/formail -I "X-Label: pkgsrc-bugs"

# pkgsrc-bulk
:0fhw
* ^List-Id: pkgsrc-bulk.*
| /usr/pkg/bin/formail -I "X-Label: pkgsrc-bulk"

# pkgsrc-changes
:0fhw
* ^List-Id: pkgsrc-changes.*
| /usr/pkg/bin/formail -I "X-Label: pkgsrc-changes"

# pkgsrc-users
:0fhw
* ^List-Id: pkgsrc-users.*
| /usr/pkg/bin/formail -I "X-Label: pkgsrc-users"

# pkgsrc-wip-changes
:0fhw
* ^List-Id: pkgsrc-wip-changes.*
| /usr/pkg/bin/formail -I "X-Label: pkgsrc-wip-changes"

# regional-au
:0fhw
* ^List-Id: regional-au.*
| /usr/pkg/bin/formail -I "X-Label: regional-au"

# regional-boston
:0fhw
* ^List-Id: regional-boston.*
| /usr/pkg/bin/formail -I "X-Label: regional-boston"

# regional-ca
:0fhw
* ^List-Id: regional-ca.*
| /usr/pkg/bin/formail -I "X-Label: regional-ca"

# regional-ch
:0fhw
* ^List-Id: regional-ch.*
| /usr/pkg/bin/formail -I "X-Label: regional-ch"

# regional-cs
:0fhw
* ^List-Id: regional-cs.*
| /usr/pkg/bin/formail -I "X-Label: regional-cs"

# regional-de
:0fhw
* ^List-Id: regional-de.*
| /usr/pkg/bin/formail -I "X-Label: regional-de"

# regional-fr
:0fhw
* ^List-Id: regional-fr.*
| /usr/pkg/bin/formail -I "X-Label: regional-fr"

# regional-helsinki
:0fhw
* ^List-Id: regional-helsinki.*
| /usr/pkg/bin/formail -I "X-Label: regional-helsinki"

# regional-it
:0fhw
* ^List-Id: regional-it.*
| /usr/pkg/bin/formail -I "X-Label: regional-it"

# regional-jp
:0fhw
* ^List-Id: regional-jp.*
| /usr/pkg/bin/formail -I "X-Label: regional-jp"

# regional-london
:0fhw
* ^List-Id: regional-london.*
| /usr/pkg/bin/formail -I "X-Label: regional-london"

# regional-nordic
:0fhw
* ^List-Id: regional-nordic.*
| /usr/pkg/bin/formail -I "X-Label: regional-nordic"

# regional-nyc
:0fhw
* ^List-Id: regional-nyc.*
| /usr/pkg/bin/formail -I "X-Label: regional-nyc"

# regional-pl
:0fhw
* ^List-Id: regional-pl.*
| /usr/pkg/bin/formail -I "X-Label: regional-pl"

# regional-sfba
:0fhw
* ^List-Id: regional-sfba.*
| /usr/pkg/bin/formail -I "X-Label: regional-sfba"

# security-announce
:0fhw
* ^List-Id: security-announce.*
| /usr/pkg/bin/formail -I "X-Label: security-announce"

# source-changes
:0fhw
* ^List-Id: source-changes.*
| /usr/pkg/bin/formail -I "X-Label: source-changes"

# source-changes-full
:0fhw
* ^List-Id: source-changes-full.*
| /usr/pkg/bin/formail -I "X-Label: source-changes-full"

# source-changes-d
:0fhw
* ^List-Id: source-changes-d.*
| /usr/pkg/bin/formail -I "X-Label: source-changes-d"

# tech-cluster
:0fhw
* ^List-Id: tech-cluster.*
| /usr/pkg/bin/formail -I "X-Label: tech-cluster"

# tech-crypto
:0fhw
* ^List-Id: tech-crypto.*
| /usr/pkg/bin/formail -I "X-Label: tech-crypto"

# tech-embed
:0fhw
* ^List-Id: tech-embed.*
| /usr/pkg/bin/formail -I "X-Label: tech-embed"

# tech-install
:0fhw
* ^List-Id: tech-install.*
| /usr/pkg/bin/formail -I "X-Label: tech-install"

# tech-kern
:0fhw
* ^List-Id: tech-kern.*
| /usr/pkg/bin/formail -I "X-Label: tech-kern"

# tech-misc
:0fhw
* ^List-Id: tech-misc.*
| /usr/pkg/bin/formail -I "X-Label: tech-misc"

# tech-net
:0fhw
* ^List-Id: tech-net.*
| /usr/pkg/bin/formail -I "X-Label: tech-net"

# tech-perform
:0fhw
* ^List-Id: tech-perform.*
| /usr/pkg/bin/formail -I "X-Label: tech-perform"

# tech-pkg
:0fhw
* ^List-Id: tech-pkg.*
| /usr/pkg/bin/formail -I "X-Label: tech-pkg"

# tech-ports
:0fhw
* ^List-Id: tech-ports.*
| /usr/pkg/bin/formail -I "X-Label: tech-ports"

# tech-repository
:0fhw
* ^List-Id: tech-repository.*
| /usr/pkg/bin/formail -I "X-Label: tech-repository"

# tech-security
:0fhw
* ^List-Id: tech-security.*
| /usr/pkg/bin/formail -I "X-Label: tech-security"

# tech-smp
:0fhw
* ^List-Id: tech-smp.*
| /usr/pkg/bin/formail -I "X-Label: tech-smp"

# tech-toolchain
:0fhw
* ^List-Id: tech-toolchain.*
| /usr/pkg/bin/formail -I "X-Label: tech-toolchain"

# tech-userlevel
:0fhw
* ^List-Id: tech-userlevel.*
| /usr/pkg/bin/formail -I "X-Label: tech-userlevel"

# tech-x11
:0fhw
* ^List-Id: tech-x11.*
| /usr/pkg/bin/formail -I "X-Label: tech-x11"

# www-changes
:0fhw
* ^List-Id: www-changes.*
| /usr/pkg/bin/formail -I "X-Label: www-changes"

# port-acorn26
:0fhw
* ^List-Id: port-acorn26.*
| /usr/pkg/bin/formail -I "X-Label: port-acorn26"

# port-acorn32
:0fhw
* ^List-Id: port-acorn32.*
| /usr/pkg/bin/formail -I "X-Label: port-acorn32"

# port-algor
:0fhw
* ^List-Id: port-algor.*
| /usr/pkg/bin/formail -I "X-Label: port-algor"

# port-alpha
:0fhw
* ^List-Id: port-alpha.*
| /usr/pkg/bin/formail -I "X-Label: port-alpha"

# port-amd64
:0fhw
* ^List-Id: port-amd64.*
| /usr/pkg/bin/formail -I "X-Label: port-amd64"

# port-amiga
:0fhw
* ^List-Id: port-amiga.*
| /usr/pkg/bin/formail -I "X-Label: port-amiga"

# port-arc
:0fhw
* ^List-Id: port-arc.*
| /usr/pkg/bin/formail -I "X-Label: port-arc"

# port-arm
:0fhw
* ^List-Id: port-arm.*
| /usr/pkg/bin/formail -I "X-Label: port-arm"

# port-atari
:0fhw
* ^List-Id: port-atari.*
| /usr/pkg/bin/formail -I "X-Label: port-atari"

# port-avr32
:0fhw
* ^List-Id: port-avr32.*
| /usr/pkg/bin/formail -I "X-Label: port-avr32"

# port-bebox
:0fhw
* ^List-Id: port-bebox.*
| /usr/pkg/bin/formail -I "X-Label: port-bebox"

# port-cats
:0fhw
* ^List-Id: port-cats.*
| /usr/pkg/bin/formail -I "X-Label: port-cats"

# port-cobalt
:0fhw
* ^List-Id: port-cobalt.*
| /usr/pkg/bin/formail -I "X-Label: port-cobalt"

# port-dreamcast
:0fhw
* ^List-Id: port-dreamcast.*
| /usr/pkg/bin/formail -I "X-Label: port-dreamcast"

# port-evbmips
:0fhw
* ^List-Id: port-evbmips.*
| /usr/pkg/bin/formail -I "X-Label: port-evbmips"

# port-ews4800mips
:0fhw
* ^List-Id: port-ews4800mips.*
| /usr/pkg/bin/formail -I "X-Label: port-ews4800mips"

# port-hp300
:0fhw
* ^List-Id: port-hp300.*
| /usr/pkg/bin/formail -I "X-Label: port-hp300"

# port-hpcarm
:0fhw
* ^List-Id: port-hpcarm.*
| /usr/pkg/bin/formail -I "X-Label: port-hpcarm"

# port-hpcmips
:0fhw
* ^List-Id: port-hpcmips.*
| /usr/pkg/bin/formail -I "X-Label: port-hpcmips"

# port-hpcsh
:0fhw
* ^List-Id: port-hpcsh.*
| /usr/pkg/bin/formail -I "X-Label: port-hpcsh"

# port-hppa
:0fhw
* ^List-Id: port-hppa.*
| /usr/pkg/bin/formail -I "X-Label: port-hppa"

# port-i386
:0fhw
* ^List-Id: port-i386.*
| /usr/pkg/bin/formail -I "X-Label: port-i386"

# port-ia64
:0fhw
* ^List-Id: port-ia64.*
| /usr/pkg/bin/formail -I "X-Label: port-ia64"

# port-ibmnws
:0fhw
* ^List-Id: port-ibmnws.*
| /usr/pkg/bin/formail -I "X-Label: port-ibmnws"

# port-iyonix
:0fhw
* ^List-Id: port-iyonix.*
| /usr/pkg/bin/formail -I "X-Label: port-iyonix"

# port-luna68k
:0fhw
* ^List-Id: port-luna68k.*
| /usr/pkg/bin/formail -I "X-Label: port-luna68k"

# port-m68k
:0fhw
* ^List-Id: port-m68k.*
| /usr/pkg/bin/formail -I "X-Label: port-m68k"

# port-mac68k
:0fhw
* ^List-Id: port-mac68k.*
| /usr/pkg/bin/formail -I "X-Label: port-mac68k"

# port-macppc
:0fhw
* ^List-Id: port-macppc.*
| /usr/pkg/bin/formail -I "X-Label: port-macppc"

# port-mips
:0fhw
* ^List-Id: port-mips.*
| /usr/pkg/bin/formail -I "X-Label: port-mips"

# port-mipsco
:0fhw
* ^List-Id: port-mipsco.*
| /usr/pkg/bin/formail -I "X-Label: port-mipsco"

# port-mvme68k
:0fhw
* ^List-Id: port-mvme68k.*
| /usr/pkg/bin/formail -I "X-Label: port-mvme68k"

# port-mvmeppc
:0fhw
* ^List-Id: port-mvmeppc.*
| /usr/pkg/bin/formail -I "X-Label: port-mvmeppc"

# port-news68k
:0fhw
* ^List-Id: port-news68k.*
| /usr/pkg/bin/formail -I "X-Label: port-news68k"

# port-newsmips
:0fhw
* ^List-Id: port-newsmips.*
| /usr/pkg/bin/formail -I "X-Label: port-newsmips"

# port-next68k
:0fhw
* ^List-Id: port-next68k.*
| /usr/pkg/bin/formail -I "X-Label: port-next68k"

# port-ofppc
:0fhw
* ^List-Id: port-ofppc.*
| /usr/pkg/bin/formail -I "X-Label: port-ofppc"

# port-pc532
:0fhw
* ^List-Id: port-pc532.*
| /usr/pkg/bin/formail -I "X-Label: port-pc532"

# port-pdp10
:0fhw
* ^List-Id: port-pdp10.*
| /usr/pkg/bin/formail -I "X-Label: port-pdp10"

# port-playstation2
:0fhw
* ^List-Id: port-playstation2.*
| /usr/pkg/bin/formail -I "X-Label: port-playstation2"

# port-pmax
:0fhw
* ^List-Id: port-pmax.*
| /usr/pkg/bin/formail -I "X-Label: port-pmax"

# port-powerpc
:0fhw
* ^List-Id: port-powerpc.*
| /usr/pkg/bin/formail -I "X-Label: port-powerpc"

# port-prep
:0fhw
* ^List-Id: port-prep.*
| /usr/pkg/bin/formail -I "X-Label: port-prep"

# port-s390
:0fhw
* ^List-Id: port-s390.*
| /usr/pkg/bin/formail -I "X-Label: port-s390"

# port-sandpoint
:0fhw
* ^List-Id: port-sandpoint.*
| /usr/pkg/bin/formail -I "X-Label: port-sandpoint"

# port-sbmips
:0fhw
* ^List-Id: port-sbmips.*
| /usr/pkg/bin/formail -I "X-Label: port-sbmips"

# port-sgimips
:0fhw
* ^List-Id: port-sgimips.*
| /usr/pkg/bin/formail -I "X-Label: port-sgimips"

# port-sh3
:0fhw
* ^List-Id: port-sh3.*
| /usr/pkg/bin/formail -I "X-Label: port-sh3"

# port-sparc
:0fhw
* ^List-Id: port-sparc.*
| /usr/pkg/bin/formail -I "X-Label: port-sparc"

# port-sparc64
:0fhw
* ^List-Id: port-sparc64.*
| /usr/pkg/bin/formail -I "X-Label: port-sparc64"

# port-sun2
:0fhw
* ^List-Id: port-sun2.*
| /usr/pkg/bin/formail -I "X-Label: port-sun2"

# port-sun3
:0fhw
* ^List-Id: port-sun3.*
| /usr/pkg/bin/formail -I "X-Label: port-sun3"

# port-vax
:0fhw
* ^List-Id: port-vax.*
| /usr/pkg/bin/formail -I "X-Label: port-vax"

# port-x68k
:0fhw
* ^List-Id: port-x68k.*
| /usr/pkg/bin/formail -I "X-Label: port-x68k"

# port-xen
:0fhw
* ^List-Id: port-xen.*
| /usr/pkg/bin/formail -I "X-Label: port-xen"

# port-zaurus
:0fhw
* ^List-Id: port-zaurus.*
| /usr/pkg/bin/formail -I "X-Label: port-zaurus"

# amiga
:0fhw
* ^List-Id: amiga.*
| /usr/pkg/bin/formail -I "X-Label: amiga"

# amiga-dev
:0fhw
* ^List-Id: amiga-dev.*
| /usr/pkg/bin/formail -I "X-Label: amiga-dev"

# amiga-x
:0fhw
* ^List-Id: amiga-x.*
| /usr/pkg/bin/formail -I "X-Label: amiga-x"

# m68k
:0fhw
* ^List-Id: m68k.*
| /usr/pkg/bin/formail -I "X-Label: m68k"

# macbsd-development
:0fhw
* ^List-Id: macbsd-development.*
| /usr/pkg/bin/formail -I "X-Label: macbsd-development"

# macbsd-general
:0fhw
* ^List-Id: macbsd-general.*
| /usr/pkg/bin/formail -I "X-Label: macbsd-general"

# netbsd-desktop
:0fhw
* ^List-Id: netbsd-desktop.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-desktop"

# netbsd-help
:0fhw
* ^List-Id: netbsd-help.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-help"

# netbsd-java
:0fhw
* ^List-Id: netbsd-java.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-java"

# netbsd-jobs
:0fhw
* ^List-Id: netbsd-jobs.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-jobs"

# netbsd-news
:0fhw
* ^List-Id: netbsd-news.*
| /usr/pkg/bin/formail -I "X-Label: netbsd-news"

# port-hp700
:0fhw
* ^List-Id: port-hp700.*
| /usr/pkg/bin/formail -I "X-Label: port-hp700"

# tech-multimedia
:0fhw
* ^List-Id: tech-multimedia.*
| /usr/pkg/bin/formail -I "X-Label: tech-multimedia"

# atf-devel
:0fhw
* ^List-Id: atf-devel.*
| /usr/pkg/bin/formail -I "X-Label: atf-devel"