Gnus development mailing list
 help / color / mirror / Atom feed
From: steve@miranova.com (Steven L. Baur)
Cc: ding@ifi.uio.no
Subject: Symbolic Links for mailboxes in Gnus
Date: 04 Dec 1995 13:09:37 -0800	[thread overview]
Message-ID: <m2zqd8y1ri.fsf_-_@diana.miranova.com> (raw)
In-Reply-To: Erik Selberg's message of 04 Dec 1995 12:06:43 -0800

(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


  reply	other threads:[~1995-12-04 21:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-03  5:22 Found no mail! [sgnus 0.17] Steven L. Baur
1995-12-03  7:29 ` Steven L. Baur
1995-12-03 22:25   ` Erik Selberg
     [not found]     ` <m2ivjxllq9.fsf@diana.miranova.com>
     [not found]       ` <199512040241.SAA20522@meitner.cs.washington.edu>
     [not found]         ` <m2bupo39qu.fsf@diana.miranova.com>
1995-12-04 20:06           ` Erik Selberg
1995-12-04 21:09             ` Steven L. Baur [this message]
1995-12-04 23:47               ` Symbolic Links for mailboxes in Gnus Erik Selberg
1995-12-04  1:50   ` Found no mail! [sgnus 0.17] Lars Magne Ingebrigtsen
1995-12-04  3:52     ` Steven L. Baur
1995-12-04 16:26 ` General sgnus 0.17 problems [Was: Found no mail! [sgnus 0.17]] Sten Drescher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2zqd8y1ri.fsf_-_@diana.miranova.com \
    --to=steve@miranova.com \
    --cc=ding@ifi.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).