From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4257 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: Symbolic Links for mailboxes in Gnus Date: 04 Dec 1995 13:09:37 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: References: <199512032225.OAA12744@wally.cs.washington.edu> <199512040241.SAA20522@meitner.cs.washington.edu> <199512042006.MAA29548@wally.cs.washington.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.28) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035145029 29008 80.91.224.250 (20 Oct 2002 20:17:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:17:09 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id NAA27501 for ; Mon, 4 Dec 1995 13:51:59 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 4 Dec 1995 22:09:24 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id NAA27139; Mon, 4 Dec 1995 13:09:39 -0800 Original-To: Erik Selberg X-Url: http://www.miranova.com/%7Esteve/ In-Reply-To: Erik Selberg's message of 04 Dec 1995 12:06:43 -0800 Original-Lines: 43 X-Mailer: September Gnus v0.17/XEmacs 19.13 Xref: main.gmane.org gmane.emacs.gnus.general:4257 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4257 (Code examples taken from nnmail.el) 1) If you're using procmail for mail splitting, symbolic links in the procmail directory are automagically removed from consideration by the following code in nnmail-get-spool-files: ;; Remove any directories that inadvertantly match the procmail ;; suffix, which might happen if the suffix is "". (while p (and (or (file-directory-p (car p)) >>>> (file-symlink-p (car p))) (setq procmails (delete (car p) procmails))) (setq p (cdr p))) This is as it should be, IMHO. However, the incorrect comment should be changed to reflect the fact that symbolic links are ditched too. 2) If you are not using procmail, the the following code loses when the mailbox is a symbolic link (from nnmail-get-new-mail): ;; The we go through all the existing spool files and split the ;; mail from each. (while spools (setq spool (pop spools)) ;; We read each spool file if either the spool is a POP-mail ;; spool, or the file exists. We can't check for the ;; existance of POPped mail. (when (or (string-match "^po:" spool) (and (file-exists-p spool) >>>> (> (nth 7 (file-attributes spool)) 0))) The idiom (nth 7 (file-attributes ...)) returns the file size, but with a symbolic link, it will return the length in characters of the filename the link is pointing to (always > 0). In order to make this code work with symbolic links it must be changed to: (> (nth 7 (file-attributes (file-truename spool))) 0))) Now the code will work with symbolic links, which also seem to not bother movemail. Do we really want Gnus to encourage this unsafe practice? -- steve@miranova.com baur