From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15045 Path: main.gmane.org!not-for-mail From: Carsten Leonhardt Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus and the qmail maildir format Date: 23 Apr 1998 16:23:59 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="pgp-sign-Multipart_Thu_Apr_23_16:23:35_1998-1"; micalg=pgp-md5 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035154141 19775 80.91.224.250 (20 Oct 2002 22:49:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:49:01 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id HAA31621 for ; Thu, 23 Apr 1998 07:24:16 -0700 Original-Received: from sina.hpc.uh.edu (Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id JAA07217 for ; Thu, 23 Apr 1998 09:36:23 -0500 (CDT) Original-Received: from sina.hpc.uh.edu (Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id JAH02963; Thu, 23 Apr 1998 09:36:19 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 23 Apr 1998 09:32:14 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id JAA02943 for ; Thu, 23 Apr 1998 09:31:49 -0500 (CDT) Original-Received: (qmail 29056 invoked by uid 504); 23 Apr 1998 14:31:31 -0000 Original-Received: (qmail 29020 invoked from network); 23 Apr 1998 14:27:21 -0000 Original-Received: from sundancer.oche.de (194.94.252.29) by claymore.vcinet.com with SMTP; 23 Apr 1998 14:26:31 -0000 Original-Received: (qmail 32386 invoked by uid 10); 23 Apr 1998 14:26:10 -0000 Original-Received: (qmail 5037 invoked from network); 23 Apr 1998 14:24:15 -0000 Original-Received: from arioch.oche.de (qmailr@10.6.6.6) by xiombarg.arioch.oche.de with SMTP; 23 Apr 1998 14:24:15 -0000 Original-Received: (qmail 4123 invoked by uid 666); 23 Apr 1998 14:24:00 -0000 Original-To: ding@gnus.org In-Reply-To: patl@curl.com's message of "10 Apr 1998 13:30:32 -0400" Original-Lines: 102 X-Mailer: Gnus v5.6.4/XEmacs 21.0(beta33) - "Nigerian Dwarf" Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:15045 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15045 --pgp-sign-Multipart_Thu_Apr_23_16:23:35_1998-1 Content-Type: multipart/mixed; boundary="Multipart_Thu_Apr_23_16:23:35_1998-1" Content-Transfer-Encoding: 7bit --Multipart_Thu_Apr_23_16:23:35_1998-1 Content-Type: text/plain; charset=US-ASCII >>>>> "patl" == Patrick J LoPresti writes: patl> Since nobody else has volunteered to take up this task, I guess patl> I will have to hack it up myself. I hacked(!) up nnmail to support maildir fetching quite some time ago. I use mv instead of movemail in connection with the patch, because movemail leaves zero-byte files lying around. I hope this inspires you :-) leo --Multipart_Thu_Apr_23_16:23:35_1998-1 Content-Type: text/plain; charset=US-ASCII *** nnmail.el.orig Wed Apr 1 05:43:39 1998 --- nnmail.el Fri Mar 20 01:57:52 1998 *************** *** 1006,1011 **** --- 1006,1046 ---- (goto-char end) (forward-line 2))))) + ;; Added by Carsten Leonhardt . + (defun nnmail-process-maildir-mail-format (func artnum-func) + ; In qmail's maildir directory, every file contains exactly one mail + (let ((case-fold-search t) + message-id) + (goto-char (point-min)) + ;; Find the end of the head. + (narrow-to-region + (point-min) + (if (search-forward "\n\n" nil t) + (1- (point)) + ;; This will never happen, but just to be on the safe side -- + ;; if there is no head-body delimiter, we search a bit manually. + (while (and (looking-at "From \\|[^ \t]+:") + (not (eobp))) + (forward-line 1) + (point)))) + ;; Find the Message-ID header. + (goto-char (point-min)) + (if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t) + (setq message-id (match-string 1)) + ;; There is no Message-ID here, so we create one. + (save-excursion + (when (re-search-backward "^Message-ID[ \t]*:" nil t) + (beginning-of-line) + (insert "Original-"))) + (forward-line 1) + (insert "Message-ID: " (setq message-id (nnmail-message-id)) "\n")) + (run-hooks 'nnmail-prepare-incoming-header-hook) + ;; Allow the backend to save the article. + (widen) + (save-excursion + (goto-char (point-min)) + (nnmail-check-duplication message-id func artnum-func)))) + (defun nnmail-split-incoming (incoming func &optional exit-func group artnum-func) "Go through the entire INCOMING file and pick out each individual mail. *************** *** 1035,1040 **** --- 1070,1077 ---- (nnmail-process-babyl-mail-format func artnum-func)) ((looking-at "\^A\^A\^A\^A") (nnmail-process-mmdf-mail-format func artnum-func)) + ((looking-at "Return-Path:") + (nnmail-process-maildir-mail-format func artnum-func)) (t (nnmail-process-unix-mail-format func artnum-func)))) (when exit-func --Multipart_Thu_Apr_23_16:23:35_1998-1-- --pgp-sign-Multipart_Thu_Apr_23_16:23:35_1998-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP MESSAGE----- Version: 2.6.3ia iQEVAwUBNT9O+iWrJ7knJI1BAQEMHAf/V1jQrugAbMI+SL2muATLxOf4uAzciDO/ 6ULGTwkCMKHVN8LyeLl+9A3neBnqvh+YfFLzkPFeLixYCwSXvsks69JIcMxTYXCF BTEbxjFut/FVSOexcC2dYcuoQ1zNzUn/uO3f87GEMJ94lY6mpHOIboEBnj23OZW7 nwZCwpkueMh6Pmmel/oBoRi8CAlOWylZZKwfx4H2j8tprE8IAZBjgA2ZBCVYkY9Y TrwWcy74WM6QNo4V7SSWSTwAiuxWwoDpNdDxoW8I0+wBKBsniyX5YLwvmDhqjGx4 83TXfk8GwLwYjTJE7cAyuv3ws5MyrvjrdB2LowbIR3eQk8nVtQemug== =EGTc -----END PGP MESSAGE----- --pgp-sign-Multipart_Thu_Apr_23_16:23:35_1998-1--