From 55ddb764afe203bf86a371fc344329ef81a6b0f8 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 25 Jun 2008 17:48:43 +0200 Subject: [PATCH 1/1] rework debian filters --- procmail/rules/debian | 44 +++++++++++++++------ procmail/rules/debian-debbugs-autosubscribe | 5 +-- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/procmail/rules/debian b/procmail/rules/debian index 4422ebf..d42f8a9 100644 --- a/procmail/rules/debian +++ b/procmail/rules/debian @@ -1,22 +1,26 @@ -INCLUDERC=$PMRULES/debian-debbugs-autosubscribe - :0 * FROM ?? ^owner@bugs\.debian\.org \(Debian Bug Tracking System\)$ -* ^X-Debian-PR-Message: ack-info +* MESSAGE ?? ^ack-info { LOG="debian: discarding BTS reply acknowledgement$NL" SWITCHRC=$PMDIR/discard } -:0 E -* ^X-Debian-Package: \/.+ -* ? grep -q "^${MATCH}$" $CONF/debian-packages -{ - LOG="debian: message related to package $MATCH$NL" - DEST=debian.$MATCH -} +:0 +*$ ^X-Debian-PR-Package:$RE_EXTRACT_HEADER_VALUE +{ PACKAGE="$MATCH" } -:0 E +:0 +*$ ^X-Debian-PR-Source:$RE_EXTRACT_HEADER_VALUE +{ SRCPACKAGE="$MATCH" } + +:0 +*$ ^X-Debian-PR-Message:$RE_EXTRACT_HEADER_VALUE +{ MESSAGE="$MATCH" } + +INCLUDERC=$PMRULES/debian-debbugs-autosubscribe + +:0 * EQ_TO ?? ^logcheck-(devel|commits)@lists\.alioth\.debian\.org$ { DEST=debian.logcheck } @@ -33,14 +37,22 @@ INCLUDERC=$PMRULES/debian-debbugs-autosubscribe { DEST=debian.netconf } :0 E -* EQ_TO ?? ^.+@debian\.(org|ch|net)$ -{ DEST=debian } +* SRCPACKAGE ?? . +* ? $FGREP -q "${SRCPACKAGE}" $CONF/debian-packages +{ + LOG="debian: message related to package $MATCH$NL" + DEST=debian.$SRCPACKAGE +} :0 E * 1^0 EQ_TO ?? ^(madduck|press)@debconf\.org$ * 1^0 EQ_TO ?? ^debconf-team@lists\.debconf\.org$ { DEST=debian.debconf } +:0 E +* EQ_TO ?? ^.+@debian\.(org|ch|net)$ +{ DEST=debian } + # delay messages until next weekend :0 * 1 ^0 ORIGINAL_TO ?? deb(ian\.(org|ch|net)|conf\.org)@ @@ -48,6 +60,12 @@ INCLUDERC=$PMRULES/debian-debbugs-autosubscribe * -1000 ^0 JUSTME ?? . * 1000 ^0 JUSTME ?? ^explicitly excepted address$ * -1000 ^0 EQ_TO ?? ^debian-security-announce@lists\.debian\.org$ +* -1000 ^0 EQ_TO ?? ^debian-devel-announce@lists\.debian\.org$ +* -1000 ^0 EQ_TO ?? ^debian-announce@lists\.debian\.org$ { DELAY="$DELAY_NEXT_WEEKEND" } +MESSAGE +SRCPACKAGE +PACKAGE + # vim:ft=procmail diff --git a/procmail/rules/debian-debbugs-autosubscribe b/procmail/rules/debian-debbugs-autosubscribe index b69a8c7..98bab8d 100644 --- a/procmail/rules/debian-debbugs-autosubscribe +++ b/procmail/rules/debian-debbugs-autosubscribe @@ -2,16 +2,15 @@ AUTOSUBSCRIBE_HEADER_TOKEN='X-debbugs-autosubscribe: madduck' :0 * FROM ?? ^owner@bugs\.debian\.org \(Debian Bug Tracking System\)$ -* ^X-Debian-PR-Message: ack \/[0-9]+ +* MESSAGE ?? ^ack \/[0-9]+ { :0 fw |$FORMAIL -A "$AUTOSUBSCRIBE_HEADER_TOKEN" LOG="debian: auto-subscribing to bug #$MATCH$NL" - SENDMAILFLAGS="$SENDMAILFLAGS -f madduck@debian.org" :0 - !$MATCH-subscribe@bugs.debian.org + |echo |$SENDMAIL $SENDMAILFLAGS -f madduck@debian.org $MATCH-subscribe@bugs.debian.org } :0 EBH -- 2.39.5