From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/27190 Path: main.gmane.org!not-for-mail From: Carsten Leonhardt Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Re: mail-sources on a different machine? Date: 24 Nov 1999 02:55:48 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <87emdgac0r.fsf@elric.arioch.oche.de> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035164261 23306 80.91.224.250 (21 Oct 2002 01:37:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:37:41 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id UAA19939 for ; Tue, 23 Nov 1999 20:57:00 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id TAB18284; Tue, 23 Nov 1999 19:56:49 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 23 Nov 1999 19:56:58 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id TAA05016 for ; Tue, 23 Nov 1999 19:56:48 -0600 (CST) Original-Received: from arioch.oche.de (qmailr@arioch.oche.de [194.94.252.126]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id UAA19928 for ; Tue, 23 Nov 1999 20:56:00 -0500 (EST) Original-Received: (qmail 28698 invoked from network); 24 Nov 1999 01:55:48 -0000 Original-Received: from elric.arioch.oche.de (qmailr@10.6.6.6) by arioch.oche.de with SMTP; 24 Nov 1999 01:55:48 -0000 Original-Received: (qmail 23043 invoked by uid 1000); 24 Nov 1999 01:55:48 -0000 Original-To: ding@gnus.org Mail-Copies-To: never Original-Lines: 41 User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) XEmacs/21.1 (Bryce Canyon) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:27190 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:27190 --=-=-= Lars Magne Ingebrigtsen writes: > "Rene Matteau" writes: > > > (setq mail-sources '( > > (file :path "/matteau@matteau:/var/spool/mail/matteau") > > )) > > I don't think this will work. We use movemail to move mail, and it > doesn't understand ange-ftp file names. One could use `rename-file', > but that wouldn't do file locking, which means that You Would Lose > Mail Sooner Or Later, which is not nice. Which reminds me, with the attached patch (which works around the fact that "file-regular-p" is not [yet] implemented in efs/ange-ftp), it will work for maildirs. Like (setq mail-sources '((maildir :path "/leo@arioch.oche.de:~/Maildir/new"))) The only drawback I can see is that efs seems to cache directory listings for some time, so gnus doesn't always fetch all the mail it could. For the lisp ChangeLog: 1999-11-24 Carsten Leonhardt * mail-source.el (mail-source-fetch-maildir): work around the ommitted "file-regular-p" in efs/ange-ftp For the texi ChangeLog: 1999-11-24 Carsten Leonhardt * gnus.texi (Mail Source Specifiers): Mention maildir in the overview and the possibility to use remote maildirs. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=remote-maildirs.patch Content-Description: patch to allow for remote maildirs Index: lisp/mail-source.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v retrieving revision 5.20 diff -u -r5.20 mail-source.el --- lisp/mail-source.el 1999/11/23 07:54:13 5.20 +++ lisp/mail-source.el 1999/11/24 01:53:23 @@ -439,7 +439,7 @@ (let ((found 0) (mail-source-string (format "maildir:%s" path))) (dolist (file (directory-files path t)) - (when (and (file-regular-p file) + (when (and (not (file-directory-p file)) (not (if function (funcall function file mail-source-crash-box) (rename-file file mail-source-crash-box)))) Index: texi/gnus.texi =================================================================== RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v retrieving revision 5.122 diff -u -r5.122 gnus.texi --- texi/gnus.texi 1999/11/23 22:29:10 5.122 +++ texi/gnus.texi 1999/11/24 01:55:43 @@ -10244,7 +10244,8 @@ @subsection Mail Sources Mail can be gotten from many different sources---the mail spool, from a -POP mail server, or from a procmail directory, for instance. +POP mail server, from a procmail directory, or from a maildir, for +instance. @menu * Mail Source Specifiers:: How to specify what a mail source is. @@ -10458,9 +10459,9 @@ @end lisp @item maildir -Get mail from a maildir. This is a type of mailbox currently only -supported by qmail, where each file in a special directory contains -exactly one mail. +Get mail from a maildir. This is a type of mailbox that is supported by +at least qmail and postfix, where each file in a special directory +contains exactly one mail. Keywords: @@ -10471,14 +10472,22 @@ If you sometimes look at your mail through a pop3 daemon before fetching them with Gnus, you may also have to fetch your mails from the -@code{cur} directory inside the maildir, like in the following example. +@code{cur} directory inside the maildir, like in the first example +below. +You can also get mails from remote hosts (because maildirs don't suffer +from locking problems). + @end table -An example maildir mail source: +Two example maildir mail sources: @lisp (maildir :path "/home/user-name/Maildir/cur") +@end lisp + +@lisp +(maildir :path "/user@@remotehost.org:~/Maildir/new") @end lisp @item imap --=-=-=--