Subject: Re: `elm -f $file' file locking, multidrops, and procmail

From: [email-masked] (David W. Tamkin)
Date: Thu, 28 Jul 1994 20:06:06 -0500 (CDT)

Scott Hammond has a dream:

| What I want is for elm to use the same
| locking on the folder specified with -f that is used for the mail spool ...
| However, it appears that elm doesn't use mail spool locking on folders. 

It won't do it on the mail spool either if you start Elm this way:

	elm -f /path/to/spool/file

In fact, Elm respects locks only when it is reading $MAIL and, in fact, only
when it was told so in those terms (by being called -f ! or with no -f at all).

| Any way to get elm to do this for folders?

Short of patching and recompiling Elm, no.  You can do this, but it is
disgustingly kludgy and very limited (sample in sh syntax):

	MAIL=folder/toread  elm

Elm will treat folder/toread as a spool file, and if there is any locking
method that both Elm and procmail are compiled to use, they'll respect each
other's locks.  (You'll even see N flags for that folder.)  But if you use
Elm's 'c' command to change folders once you're inside Elm, even to your
spool file, you'll be back where you usually are when you try to read from
folders.  If you want to change back to the first folder, be sure to call
it "!" (Elm's abbreviation for $MAIL) rather than using its name.

David W. Tamkin  P. O. Box 3284  Skokie IL  60076-6284
[email-masked]   MCI Mail: 426-1818   +1 312 714 5610

---

From: "Joshua A. Laff" <[email-masked]>
Date: Thu, 28 Jul 1994 21:29:32 -0500 (CDT)

In our previous episode, Scott Hammond said:
:) [this is really an elm problem, but hopefully a fellow procmail user has
:)  dealt with it]

I don't have the exact situation you do, but my solution may work. I have a
folder that I keep gzip'd. To read it, I need to unzip it, but this will mess
up any delivery attempts. Therefore, I have the following alias set up. The
lockfile I use is the same lockfile I specify for this folder in my
.procmailrc. I have yet to encounter any problems with this, although the
obvious one is if I take an extensive amount of time to read mail in this
folder.

lockfile ~/.backup/received.lock; gunzip ~/.backup/received.gz; elm -f ~/.backup/received; gzip ~/.backup/received; rm -f ~/.backup/received.lock

      Joshua A. Laff    (217)      //  Disclaimer: If I was important enough
    CRL Head Operator     333-    //  that the UofI would let me speak for it,
  University of Illinois   7408  //  the *last* thing I'd be doing would be
email to: [email-masked]      //  sitting in front of a computer all day.
===============================================================================
Mattel has come out with a new Barbie doll for Christmas: Divorcee' Barbie.
It comes with all the usual accessories, plus all of Ken's stuff.