[comp.sys.next] What's going on in NeXTmail?

silbar@mpx2.lampf.lanl.gov (SILBAR, RICHARD R.) (09/30/90)

Something peculiar seems to be going on in my Cube.  The basic problem 
seems to be that when I do "du -s ~/Mailboxes", it reports 17 MBytes of
my disk is tied up in mail.  And, I'd be a lot better off recovering most
of that disk space, since (as you'll see) a lot of it is junk.

Warning: I am no mail maven.  The following reflects my naive notions
about what I thought/think a proper mail utility ought to do.

Let me see if I can make historical sense of this.  I had been out of town
a few days and, on return home, decided to catch up on my mail. So I logged
onto the Cube from home using my wife's PC.  After clearing the Net News, I
looked at my mail by doing "mail -f ~/Mailboxes/Active.mbox/mbox" from the
c-shell.  [Side question: what "dot" file do I have to establish so the
Unix mail utility knows where to look.]  That showed 852 messages (or
whatever), all marked as U(nread).  I.e., everything I ever received since
the Cube first started getting mail some 16 months ago.  I may have tried
deleting one or two messages, but soon decided to get out of there; a
hopeless task.  I did then look at the size of mbox (more than 3 MB) and
brought it into emacs to look at it.  True -- everything received was
there. 

This is surprising because I'm fairly religious about deleting junk and 
outdated mail.  The headers in NeXTmail only showed some thirty or forty
messages the day before.  So, do I correctly conclude that NeXTmail does 
not really delete things from the mbox files, just changes the 
table_of_contents files?

On getting back to my Cube, I immediately unhid NeXTmail.  Oops -- it
had stuff in the read-window which was all jumbled up (the header-window
looked more or less OK).  After a while, it finally occurred to me to
quit the application and re-launch it.  This cleared up the read-window
but -- horrors! -- now I had 852 messages in my header-window.  (All
noted as read, incidently.)  All my deletions in months past had gone
for naught.

Moreover, also in the Active.mbox directory there was every NeXT attachment
I had ever received, including ones that went with messages I thought I had
deleted and other ones which I thought had been transferred to other mail
boxes (folders). (This all has to be done from the shell -- unless there is
a way to force Workspace Manager to go into such a directory that I don't
know about.)  It is now worth saying that I tend to move a lot of my
keepable mail into specialized mbox's.  I suspect that (since some of these
attachments were pretty big directories and files) most of my 17 MB is tied
up there.  Particularly after discovering that, say, my TopDraw.mbox
directory ALSO had COPIES of ALL of my NeXT attachments, most of which had
nothing to do with TopDraw.  (This was also true, I believe, for other mbox
directories which had, somewhere, NeXT attachments.) 

What's going on here?  If I get really annoyed enough, I'll probably start
trying some experiments of sending myself junk mail, then transferring and 
deleting it.  But, maybe one of you already knows what's going on here.
Maybe even there's a magical utility somewhere that cleans up the huge
morass that my ~/Mailbox tree has become.

     Dick Silbar (NeXT mail: silbar@whistler.lanl.gov)

glenn@heaven.woodside.ca.us (Glenn Reid) (10/01/90)

In article <64490@lanl.gov> silbar@mpx2.lampf.lanl.gov (SILBAR, RICHARD R.) writes:
>What's going on here?  If I get really annoyed enough, I'll probably start
>trying some experiments of sending myself junk mail, then transferring and 
>deleting it.  But, maybe one of you already knows what's going on here.
>Maybe even there's a magical utility somewhere that cleans up the huge
>morass that my ~/Mailbox tree has become.

There's a menu option called "Compact" under the "Utilities" menu that
actually deletes the mail.  It also removes any attachments that were
in the mail messages you deleted.

If it were deleted the second you clicked "Delete", then "UnDelete"
wouldn't work.

One way to know if your mail is getting really deleted is to look at the
sequential numbers of the mail messages.  If you have only three messages
but there numbers are 797, 798, and 799, you probably have 799 messages,
all but three of which have been "marked" for deletion.

On another note, you shouldn't open Active.mbox/mbox with /bin/mail
directly.  As you noticed, the table of contents gets out of synch with
the mail.  The reason all your deleted mail returned was that you
caused the table of contents to get rebuilt from scratch when you
deleted some messages by hand from this file.

If you're going to be away for a while, quit out of the Mail application,
and it will leave your mail in /usr/spool/mail/you, and you can read it
with /bin/mail if you like without disturbing the Mail application.

I hope that helps.

Glenn

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		PostScript/NeXT developers
 ..{adobe,next}!heaven!glenn		415-851-1785