Subject: Re: No "Status:" line in any mail

From: [email-masked] (David W. Tamkin)
Date: Mon, 17 Jan 1994 12:24:36 -0600 (CST)

Boyd Johnson wonders,

| I just started using procmail 2.92p9 and use Elm as my mailreader.
| Any mail processed by procmail does not get a "Status:" line added to
| the header, so it's difficult to keep track of what mail I've read.
| I am using the template .forward file and a very simple .procmailrc that
| does nothing but save mail to various folders depending on From and To
| strings.  Can anyone tell me how to get a "Status:" line?  I'll summarize
| if requested and if it's not a FAQ.

It's not a procmail problem: it's an Elm problem.

The designers of Elm decided that once a letter is placed into a folder other
than your main incoming mailbox, it's been handled, it's no longer new, and
its status doesn't matter.  That applies even if an automated mail thrower
put it there and human eyes never read it.  Therefore when you read a folder
with Elm no N flags show up unless that folder matches the value of your
$MAIL environmental variable.  (N indicates the absence of a Status: header.)

O flags *do* appear in other folders' index screens, though.  "O" stands for
"old" and means "previously seen in an index screen;" in other words, not new
but not read.  (If it's also been read, the status is RO, and Elm never dis-
plays an RO status on the index screen.)

Now, though what you have is not a procmail problem, there is a procmail
solution.  Put this early in your .procmailrc before filing any mail into
folders:

:0f
| formail -A "Status: O"

and that will add an O status to all incoming mail.  When you use Elm on
the folders and read the letters, the status changes to RO, which Elm never
displays.

Now, at the end of your .procmailrc, do this for all mail that will fall
off the end and be filed into $DEFAULT:

:0:
| formail -I Status: >> $DEFAULT

so that mail saved to your main mail spool will not get the phony Status:
header.

If you can pick out at the beginning of your .procmailrc which letters will
go to $DEFAULT, you can exclude them from a filter recipe that adds the
Status: header to all other mail and avoid running formail on them twice.

There is an added advantage that Elm will put the pointer on the lowest-
numbered letter that has Status: O when you go into that folder instead of
the last letter (as it does if there are no displayable statuses).  Hey, you
know, I'm going to do the same thing myself.  I may really have hit on some-
thing here.

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: Mon, 17 Jan 1994 12:30:00 -0600 (CST)

In our previous episode, Boyd Johnson said:
:) Hopefully this is a simple question from a new user.
:) I just started using procmail 2.92p9 and use Elm as my mailreader.
:) Any mail processed by procmail does not get a "Status:" line added to
:) the header, so it's difficult to keep track of what mail I've read.

This has nothing to do with procmail.

Elm, as the souce code is set up, will compile such that any folders other
than the default mail folder (/usr/spool/mail/$USER on most systems) will
not have the "Status:" header recognized. This can be changed, but it the
change is in the source code, and thus the owner of elm on your system must
recompile it with this change. Here's the compiler note that I left on
my system after making the change, which includes how to change it:

----------------/ug/src/elm/COMPILER-NOTE--------------
I've made a modification that allows the "New/Old/Read" headers to work on
folders *other* than the spool folder. Here's the change in case anyone
for any reason decides to reverse it:
==========================================================================

in the file src/newmbox.c, look for the lines:

                /* set default status - always 'visible'  - and
                 * if a spool file, presume 'new', otherwise
                 * 'read', for the time being until overridden
                 * by a Status: header.
                 * We presume 'read' for nonspool mailfile messages
                 * to be compatible messages stored with older versions of elm,
                 * which didn't support a Status: header.
                 */
                if(folder_type == SPOOL)
                  current_header->status = VISIBLE | NEW | UNREAD;
                else
                  current_header->status = VISIBLE;

about 660 lines down. (Just search for the symbol NEW)
Ok, now see that if statement.... well, just delete it and use the
true part as in

                current_header->status = VISIBLE | NEW | UNREAD;

Thats it.
========================================================================
					-Josh Laff
------------------end------------------
      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.
===============================================================================
'I was on the first submarine. Instead of a periscope, we had a kaleidescope.
   "Help! We're surrounded!!!"'    -Stephen Wright