🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.elm
Article #5485

Re: Status question

#5485
From: Darrell McIntosh
Date: Thu, 08 Mar 1990 18:37
50 lines
2814 bytes
In article <1990Mar5.171928.12129@DSI.COM> syd@DSI.COM writes:
>ajk@mace.cc.purdue.edu (Jeff Boerio) writes:
>
>
>>When using Elm, and if a message is in /usr/spool/mail, Elm will print the
>>little Status symbols for each message.  However, if I use "elm -f <folder>,
>>Elm will not extract the Status field and display it.
>
>>Can someone tell me why?  I use filter to send 98% of my mail to folders,
>>leaving very little in /usr/spool/mail.  It would be helpful to KNOW which
>>messages haven't been read (by looking at the status symbol), instead of
>>guessing which ones haven't been read.
>Elm doesn't know the difference between spooled mail and mail folders
>as far as displaying the status symbols is concerned.

Actually elm does make a distinction between the user's system mailbox
(e.g., /usr/mail/darrell) and other mailboxes.  Here is some code from
src/newmbox.c:

	      /* 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;

This code sets the initial status for mail being read from a file.  If
it's the spool file it will show as new ('N') unless a Status: header
exists which indicates differently.  Note that if you're reading your
spool file and save some mail to a file, the Status: gets saved along
with the rest of the mail.  filter (and deliver) don't add a Status:
header when storing mail. 

I use deliver to sort my incoming mail into many different files or my
spool file.  I've hacked this code to always use the initial status of
VISIBLE|NEW|UNREAD for any file.  This allows me to be able to identify
any mail that arrived since I last read the file.

If there is enough interest I'll submit my changes to Syd as a patch.

-- 
Darrell McIntosh, Motorola Microcomputer Division, Urbana [IL] Design Center
Phone:  +1 217 384 8509
Email:  darrell@urbana.mcd.mot.com, udc!darrell, uunet!uiucuxc!udc!darrell
Technical Details
Message-ID: <1142@urbana.mcd.mot.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!mcdchg!mcdphx!udc!darrell
References: <4312@mace.cc.purdue.edu> <1990Mar5.171928.12129@DSI.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!mcdchg!mcdphx!udc!darrell
From: darrell@urbana.mcd.mot.com (Darrell McIntosh)
Newsgroups: comp.mail.elm
Subject: Re: Status question
Message-ID: <1142@urbana.mcd.mot.com>
Date: 8 Mar 90 18:37:54 GMT
References: <4312@mace.cc.purdue.edu> <1990Mar5.171928.12129@DSI.COM>
Reply-To: darrell@urbana.mcd.mot.com (Darrell McIntosh)
Organization: Motorola Microcomputer Division, Urbana [IL] Design Center
Lines: 50