# freebsd.rc # procmail rules for dealing with freebsd mail # gsutter@zer0.org # # $Id: freebsd.rc,v 1.8 2003/08/17 06:57:01 gsutter Exp gsutter $ # To use: # # (optional steps; route around them as desired) # - mkdir ~/.procmail # - mv ~/.procmailrc ~/.procmail/procmailrc && \ # ln -s ~/.procmail/procmailrc ~/.procmailrc # - Add PMDIR=$HOME/.procmail to the top of your procmailrc # - Edit lists ($BSDLISTS) and target folders to your specification. # # (necessary steps) # - Put commiturl.py in your $HOME/bin or adjust calling path below. # - Put freebsd.rc in your $PMDIR (set $PMDIR as necessary). # - INCLUDERC=freebsd.rc in your .procmailrc. # FreeBSD Project commit mail REPOS=(CVSROOT|doc|ports|projects|src|www) # # Identify and tag FreeBSD commit messages. # :0 * $ ^Sender:[ ]*owner-(freebsd-)?[a-z]+-(all|committers|${REPOS})@FreeBSD.ORG * ^Subject: cvs commit: { # tag with the correct portion of the tree :0 f * $ ^Subject: cvs commit: \/${REPOS} | formail -i "X-FreeBSD-CVS-Tree: $MATCH" # add PR and CVSweb urls to the bottom of each commit :0 bf | python $HOME/bin/commiturl.py } # # Deal with other FreeBSD Project lists. # BSDLISTS="(advocacy|announce|arch|audit|chat|cluster|config|current|cvs-[a-z]+|[a-z]+-committers|[a-z]+-developers|doc|emulation|hackers|hardware|hubs|ipfw|isp|jobs|mobile|mozilla|multimedia|net|performance|ports|ppc|qa|questions|security|small|smp|stable|vendors)" :0 * $ ^${FROM}freebsd.org { :0 Wh : freebsd.lock | formail -D 32768 $PMDIR/bsd.cache :0 : * ^X-FreeBSD-CVS-Tree: www bsd/www :0 : * ^X-FreeBSD-CVS-Tree: projects bsd/projects :0 : * ^X-FreeBSD-CVS-Tree: doc bsd/doc :0 : * ^Subject:[ ]*cvs commit: * ^X-FreeBSD-CVS-Branch:[ ]*RELENG_4 bsd/stable-commit # First new ports, then all others :0 * ^Subject:[ ]*cvs commit:.*Makefile * ^X-FreeBSD-CVS-Tree:[ ]*ports { :0 B: * ^ Added files:.*$[-_ /a-z]+[ ]+Makefile([^-_.,a-z0-9]|$) bsd/newports # alternately: use formail to add an Importance: header # | formail -I "Importance: high" } :0 : * ^X-FreeBSD-CVS-Tree: ports bsd/ports :0 : * ^Sender:[ ]*owner-(freebsd-)?ports-committers bsd/ports :0 : * ^Sender:[ ]*owner-(freebsd-)?\/[a-z]+-developers | formail -i "X-Fkey: freebsd-$MATCH" >> bsd/developers :0 : * ^Sender:[ ]*owner-(freebsd-)?\/[a-z]+-committers | formail -i "X-Fkey: freebsd-$MATCH" >> bsd/cvs-committers :0 : * ^X-FreeBSD-CVS-Tree: src bsd/cvs-committers :0 : * ^Delivered-To:.*cvs-src bsd/cvs-committers :0 : * $ ^Sender:[ ]*owner-(freebsd-)?\/$BSDLISTS * BSDLISTS ?? $ $\MATCH | formail -i "X-Fkey: freebsd-$MATCH" >> bsd/$MATCH }