From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27698 invoked from network); 18 Apr 2005 18:31:34 -0000 Received: from unknown (HELO lists.gnu.org) (199.232.76.165) by sourceware.org with SMTP; 18 Apr 2005 18:31:34 -0000 Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNb2C-0000k6-NF for listarch-gnats-devel@sources.redhat.com; Mon, 18 Apr 2005 14:31:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DNb0o-00007F-GE for help-gnats@gnu.org; Mon, 18 Apr 2005 14:30:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DNb0m-00006O-Hy for help-gnats@gnu.org; Mon, 18 Apr 2005 14:30:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNb0m-0007p7-88 for help-gnats@gnu.org; Mon, 18 Apr 2005 14:30:20 -0400 Received: from [199.199.210.160] (helo=chef.nerp.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DNb1b-0003HD-7B for help-gnats@gnu.org; Mon, 18 Apr 2005 14:31:11 -0400 Received: from skuld.wookimus.net (c-66-41-156-164.hsd1.mn.comcast.net [66.41.156.164]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by chef.nerp.net (Postfix) with ESMTP id 35A6E685A7 for ; Mon, 18 Apr 2005 13:29:12 -0500 (CDT) Received: from skuld.wk (skuld.wk [192.168.5.100]) by skuld.wookimus.net (Postfix) with ESMTP id 517DC3E89 for ; Mon, 18 Apr 2005 13:29:11 -0500 (CDT) Received: by skuld.wk (Postfix, from userid 1000) id 3CB971D5C; Mon, 18 Apr 2005 13:29:11 -0500 (CDT) Date: Mon, 18 Apr 2005 18:31:00 -0000 From: Chad Walstrom To: help-gnats@gnu.org Message-ID: <20050418182911.GF1461@wookimus.net> Mail-Followup-To: help-gnats@gnu.org References: Mime-Version: 1.0 In-Reply-To: X-Operating-System: Linux skuld 2.6.10-1-k7 X-GnuPG-Fingerprint: B4AB D627 9CBD 687E 7A31 1950 0CC7 0B18 206C 5AFD User-Agent: Mutt/1.5.6+20040907i Subject: Re: how to include database name in mails X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion about GNU GNATS List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1125248641==" 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/msg00010.txt.bz2 --===============1125248641== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oXNgvKVxGWJ0RPMJ" Content-Disposition: inline --oXNgvKVxGWJ0RPMJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1369 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. >=20 > Because we gonna have a lot of databases, manually modify dbconfig > for each database is time consuming. >=20 > help! Suggestion on soucecode hacking are welcome too. 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. 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: # 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} :0 e failed-queue/${DB}/. } # Or you can have separate recipes for each database :0 w * ^(To|Cc): PRODUCT@bug.domain.tld | queue-pr --database=3DPRODUCT :0 e failed-queue/PRODUCT/. --=20 Chad Walstrom http://www.wookimus.net/ assert(expired(knowledge)); /* core dump */ --oXNgvKVxGWJ0RPMJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCY/x3DMcLGCBsWv0RApvyAJ9cmluRDbJNMaKv4UqgnEUm0hxLEwCfWjQ3 uDQmIYJ8MJiQR+LjRditAyA= =XcId -----END PGP SIGNATURE----- --oXNgvKVxGWJ0RPMJ-- --===============1125248641== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 140 _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnats --===============1125248641==--