From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hikaru Ichijyo Newsgroups: gmane.emacs.help Subject: Re: using movemail directly in .emacs Date: 26 May 2014 22:41:21 GMT Organization: UN Spacy Message-ID: <5383c311$0$61282$c3e8da3$5e5e430d@news.astraweb.com> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1401144331 18043 80.91.229.3 (26 May 2014 22:45:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 May 2014 22:45:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 27 00:45:22 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wp3dw-0002it-HU for geh-help-gnu-emacs@m.gmane.org; Tue, 27 May 2014 00:45:20 +0200 Original-Received: from localhost ([::1]:58752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wp3dw-0004Eu-2H for geh-help-gnu-emacs@m.gmane.org; Mon, 26 May 2014 18:45:20 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.14.2 (x86_64)) Original-Lines: 77 Original-NNTP-Posting-Host: c4dd4da4.news.astraweb.com Original-X-Trace: DXC=:>JDWO6e^?9Z0mn List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97888 Archived-At: Robert Thorpe wrote: > lee writes: > >> Hikaru Ichijyo writes: >>> Is any of this impossible or misguided? I'd just strongly prefer my >>> mailbox in the system spool area where most UNIX tools expect it to >>> be. >> >> It`s not impossible, yet it doesn`t make much sense. Using a single >> file like the spool file is an anachronism (and apparently doesn`t work >> too well over NFS). A single file is very awkward to work with: When >> you delete an email somewhere within the file or set a flag (like read, >> answered, etc.), the whole file needs to be rewritten. That wouldn`t be >> ideal with a file of over 4GB. >> >> In any case, the file can easily be damaged, in which case you might >> loose all your email. What happens when your computer crashes while >> it`s copying or rewriting your 4GB+ spool file? > > Spool files are a temporary storage area for email. A user reads > their mail using a program (a "Mail User Agent" or MUA) which takes > the mail from the spool file and stores it elsewhere. For most MUAs > all mail is moved from the spool file to somewhere in the user's home > directory. For some MUAs the "inbox" is the spool file, normally for > those the user is expect to move stuff out into other files. The main reason I initially wanted to go down this path is because Mutt and (Al)pine handle it gracefully, and because with their code being freely available, I couldn't see a good reason why a Lisp-based mailreader couldn't be coded to do the same thing. Somehow, Mutt and Alpine are both able to negotiate locking on the spool file such that you can safely write and expunge messages while the system MDA is doing delivery without any fear of corruption. Alpine actually handles this a little better, since whereas Mutt will handle a situation where you wanted to make a change on disk at the same time the MDA delivered a message by beeping, *not* making your change, and updating the display to show the new mails that just came in, Alpine's code seems to be able to pull the tablecloth out while the diners are eating -- it effects whatever change you made, *and* it updates the display to show the new mail. In decades of using Pine and Alpine, I've never seen it screw this up. If anyone wants a code example for how this could work, Alpine is under the Apache license. I finally gave up though and changed my setup to what Emacs expects, since Mutt and Alpine can both be setup to do that also (they just don't have to be). All my mailreaders (VM, Alpine, Mutt...) now move mail from the system spool to ~/mbox and work on it there...so Emacs is happy now. > The problem here isn't that spool files are an anarchonism, it's that > they're not made for storing large amounts of mail. It seems like most users let gigabytes of mail accumulate in their inbox. The only messages I leave in mine are active items that still need attention. Everything else gets moved to a folder as soon as possible. I never have more than 400 messages in my inbox at its worst. > It may now work on some system too because they have scripts that > delete very large spool files. (Notice I'm not saying that spool > files aren't an anachonism. Multi-user *nix computers that are never > switched off are going the way of dinosaurs and spool files with > them.) Not anywhere around me they aren't. :) Granted, we now store the central user databases in some kind of directory on a central server with something like LDAP rather than having a humongous /etc/passwd, but I work in academic computing, and universities are where big multiuser UNIX-based Internet sites have deep roots, not likely to go away any time soon. -- He that would make his own liberty secure must guard even his enemy from oppression; for if he violates this duty, he establishes a precedent that will reach to himself. --Thomas Paine