procmail
[Top] [All Lists]

Re: "already read" bit set on processed messages

1997-04-27 14:41:00
Ralph Sims asked,

| Messages stored in folders appear to have the "read" bit set after
| being handled by procmail.

This is old stuff but it hasn't come up in a while.  The operative word there
is "appear".  They don't really have any "read" bit set, as I'll explain below.

| In my /var/spool/mail/$USER mailbox,
| messages are listed as "new" via elm or pine.  When messages are
| culled by procmail and placed in folders, this bit is un-set and
| the messages are not flagged as "new", etc.

There is no bit getting set or unset.  Procmail is not altering the messages.

| The normal inbox shows "Status: OR" on those that have been read
| and no "Status: " field for undread messages.  Those in the procmail
| folders have no "Status: " field at all, which is similar to the
| unread messages in /var/spool/mail.

Exactly: procmail did not mark them "Status: OR" but Elm acts as if they were
that way.  The Status: header is Elm's only indication of, you should pardon
the expression, status.

| Ideas?

It is Elm's lunacy, and it will happen no matter what thrower (filter,
deliver, procmail, what have you) that you use.  Procmail is not altering the
incoming messages; Elm, because of an attempt at backward compatibility with
a 1970s version that didn't support a Status: header, assumes that any item
placed in a folder has been handled and is therefore as good as read.

Your choices are these:

1. Put up with it;
2. Recompile Elm with one of the available fixes for this design flaw (the
   Elm Development Group get furious if you call them "patches" because they
   contend that this problem is not a bug and that making this change is
   merely a matter of taste);
3. Wait for Elm 2.5 to come out, which reportedly will allow users to set
   which folders get "N" flags on their index screens and which do not;
4. Use a mailer that respects Status: lines in all folders; or
5. In your procmailrc, add "Status: O" to the headers of mail that will
   go to these folders.  "O" is not quite as good as "N" but it will show
   up on the index screens of all folders, and when you go to a folder Elm
   will start the pointer at the first message with an "O" if none are "N". 
   DON'T add "Status: O" to mail that is destined for your inbox, because
   then you'll lose the distinction between "N" and "O" in the one place
   where Elm provides it.