From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14288 invoked from network); 19 Apr 2005 01:14:47 -0000 Received: from unknown (HELO lists.gnu.org) (199.232.76.165) by sourceware.org with SMTP; 19 Apr 2005 01:14:47 -0000 Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNhKR-0002T1-3U for listarch-gnats-devel@sources.redhat.com; Mon, 18 Apr 2005 21:15:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DNhKG-0002St-2s for help-gnats@gnu.org; Mon, 18 Apr 2005 21:14:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DNhKE-0002SX-Iq for help-gnats@gnu.org; Mon, 18 Apr 2005 21:14:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNhKE-000102-9I for help-gnats@gnu.org; Mon, 18 Apr 2005 21:14:50 -0400 Received: from [64.233.162.193] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DNhLN-0002fg-G1 for help-gnats@gnu.org; Mon, 18 Apr 2005 21:16:01 -0400 Received: by zproxy.gmail.com with SMTP id 9so2078948nzo for ; Mon, 18 Apr 2005 18:14:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T61uAOtwxC63fIf1/XME6e3uvqADjAz7kvBobozMJiBkqloOtxGeEcL7FZfHruV++nPzqQr3NCj+enM8FBoJgdid4SAZuPGT+Q1GC/Yy7jAVhWkMF0+Eg7jWGwdS/qzd9V3XzfO/zdPgzJT15W29yHFKYTiszKz+kDIYiBP7t9s= Received: by 10.36.82.19 with SMTP id f19mr438397nzb; Mon, 18 Apr 2005 18:14:10 -0700 (PDT) Received: by 10.36.50.19 with HTTP; Mon, 18 Apr 2005 18:14:10 -0700 (PDT) Message-ID: Date: Tue, 19 Apr 2005 01:14:00 -0000 From: Lan Yufeng To: help-gnats@gnu.org In-Reply-To: <20050418182911.GF1461@wookimus.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050418182911.GF1461@wookimus.net> Subject: Re: how to include database name in mails X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lan Yufeng List-Id: General discussion about GNU GNATS List-Archive: List-Post: List-Help: List-Subscribe: , Sender: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org Errors-To: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org X-SW-Source: 2005-q2/txt/msg00012.txt.bz2 Hi, Chad. Since most our users submit bugs using the web interface, the procmail and queue-pr magic can only be played when user choose to reply gnats system emails. That's cool, but first, I just want to make it clear to the mail recipents what product database the problem report belongs to. (I understand that user could figure it out from the "From" address as you suggestted) =20 As you mentioned using sed script, maybe I should write a shell script wrapping "mkdb" command, so that it will insert appropriate database name to the mail config sections of file "dbconfig ". Thank you very much for your tips, 2005/4/19, Chad Walstrom : > On Mon, Apr 18, 2005 at 09:06:45PM +0800, Lan Yufeng wrote: > > Hi, is there any way to send notification mail with database name > > set dynamically, such as: > > Subject: FooProduct cat1/pr#123 > > * FooProduct is the database name. > > > > Because we gonna have a lot of databases, manually modify dbconfig > > for each database is time consuming. > > > > help! Suggestion on soucecode hacking are welcome too. >=20 > My first suggestion is to use a separate email for each database. It > is relatively easy to tell your email server to pipe to "queue-pr > --database DATABASE". You could probably generate a quick sed script > to walk over the dbconfig files and insert the appropriate address. >=20 > I personally email addresses named after the database in some way. > For example, bug-DATABASE@bugs.domain.tld. I then use procmail to > match the "To:" and "Cc:" headers for the database name and pipe it to > the appropriate queue-pr command: >=20 > # One recipe to rule them all... > MATCH=3D > :0: > * ^(To|Cc): bug-\/[_-a-zA-Z0-9]+ > { > DB=3D$MATCH > :0 w > | queue-pr --database=3D${DB} >=20 > :0 e > failed-queue/${DB}/. > } >=20 > # Or you can have separate recipes for each database > :0 w > * ^(To|Cc): PRODUCT@bug.domain.tld > | queue-pr --database=3DPRODUCT >=20 > :0 e > failed-queue/PRODUCT/. >=20 > -- > Chad Walstrom http://www.wookimus.net/ > assert(expired(knowledge)); /* core dump */ >=20 >=20 > _______________________________________________ > Help-gnats mailing list > Help-gnats@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnats >=20 >=20 >=20 > _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnats