From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57890 Path: main.gmane.org!not-for-mail From: "Ted Zlatanov" Newsgroups: gmane.emacs.gnus.general Subject: qmail bounce information in summary, plus a nnheader.el fake message ID question Date: 11 Jun 2004 10:35:09 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Sender: ding-owner@lists.math.uh.edu Message-ID: <4nwu2ejh7m.fsf@lifelogs.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1086965754 20858 80.91.224.253 (11 Jun 2004 14:55:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2004 14:55:54 +0000 (UTC) Original-X-From: ding-owner+M6431@lists.math.uh.edu Fri Jun 11 16:55:33 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BYnRM-0001wV-00 for ; Fri, 11 Jun 2004 16:55:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BYnPO-0000lr-00; Fri, 11 Jun 2004 09:53:30 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BYnPF-0000lj-00 for ding@lists.math.uh.edu; Fri, 11 Jun 2004 09:53:21 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BYnPB-0002tM-RY for ding@lists.math.uh.edu; Fri, 11 Jun 2004 09:53:17 -0500 Original-Received: from mail.bwh.harvard.edu (sysblade0.bwh.harvard.edu [134.174.9.44]) by justine.libertine.org (Postfix) with ESMTP id A45713A003C for ; Fri, 11 Jun 2004 09:53:16 -0500 (CDT) Original-Received: (qmail 16484 invoked from network); 11 Jun 2004 14:46:59 -0000 Envelope-Sender: tzz@lifelogs.com Envelope-Recipients: ding@gnus.org, Original-Received: from asimov.bwh.harvard.edu (HELO asimov) ([134.174.9.63]) (envelope-sender ) by mail.bwh.harvard.edu (qmail-ldap-1.03) with SMTP for ; 11 Jun 2004 14:46:59 -0000 Mail-Followup-To: "Ding Mailing List" Original-To: "Ding Mailing List" X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57890 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57890 I deal with qmail bounces a lot, being a qmail administrator. Here's a user-format-function to analyze a bounce message and give the first bounce address found. You just put %uB in your summary format line (I do this for just the "root" group where bounces go). I wanted to use the registry, but the "fake+none" message IDs Gnus generates are not consistent. It would be nice if the fake message ID, generated in nnheader.el: (concat "fake+none+" (int-to-string (incf nnheader-fake-message-id))) could incorporate the real article number and group name, so that when you re-enter the group, the fake message ID is the same as before. I think this would help make Gnus more consistent, and the registry more useful (e.g. for nnrss groups). Ted ;; note: we try to use the gnus-registry to cache this, but qmail doesn't give valid message IDs to bounces! (defun gnus-user-format-function-B (headers) (if (and headers gnus-newsgroup-name) (let* ((article (spam-fetch-field-fast -4332 'number headers)) ; -4332 is a fake article number (id (spam-fetch-field-message-id-fast article headers)) (bounce (gnus-registry-fetch-extra id 'qmail-bounce-address))) (if (and bounce (stringp bounce)) (format "C_BOUNCE %s" bounce) (with-temp-buffer (gnus-request-article-this-buffer article gnus-newsgroup-name) (if (and (search-forward "Hi. This is the" nil t) (search-forward-regexp "<\\(.*\\)>:" nil t)) (progn (setq bounce (match-string 1)) (gnus-registry-store-extra-entry id 'qmail-bounce-address bounce) (format "BOUNCE %s" bounce)) "no match")))) "invalid headers"))