Subject: Re: ARGH! Memory usage in Pine 3.95

From: David L Miller <[email-masked]>
Date: Tue, 3 Dec 1996 17:21:40 -0800

On 20 Nov 1996, Brian Miller wrote:

> Mark Crispin ([email-masked]) wrote:
> : On 19 Nov 1996, Brian Miller wrote:
> : > I'm running Pine 3.95 on a P120 under BSDI 2.0.1 w/32M
> : > memory and 200M of swap.  Not often (only about three
> : > times a day...grrrr) Pine will die on me with an "Out of free
> : > storage" error when attempting to access a mailbox
> : > that's larger than approx. 6MB in size.  
> [snip]
> 
> : Suggestion: consider using an alternative format for your mail, such as
> : tenex format.  Read the Pine technical note for more information.  We long
> : ago gave up on mbox format for big mailboxes.  Some of our people have
> : tenex format mailboxes in the tens of megabytes.
> 
> Thanks Mark.  Will definitely look into it (and probably
> use it, as long as it doesn't affect other things like
> 'procmail', etc...)

You need to make sure that procmail doesn't deliver to a Tenex folder. 
I pipe messages through tmail for delivery to my non-mbox folders.
Tmail is available in

	ftp://ftp.cac.washington.edu/mail/imap-utils.tar.Z

Note that since Sendmail prepends an mbox "From " line and procmail
keeps it, you need to get rid of that line.  Tmail also uses
"user+folder" syntax to allow direct delivery to a folder. 
Unfortunately procmail doesn't (AFAIK) make the delivery address
available directly, but it does show up in the first Received: header. 
I use the attached .procmailrc rules and script to handle this.  It is
pretty crude, but it gets the job done for me (improvements welcome ;) 

Good luck!

--DLM

-- 
|\ |  |\/|  David L. Miller    [email-masked]  (206) 685-6240
|/ |_ |  |  Software Engineer, Pine Development Team   (206) 685-4045 (FAX)
University of Washington, Networks & Distributed Computing, Box 354841
4545 15th Ave NE, Seattle WA 98105, USA     Stardate: [-31]8520.28
GTFRTMPFILE=/tmp/gtfrtmpfile.$$

# strip off "From " line from beginning of message
:0fw
| get-to-from-received

ENVELOPETO=`head -1 $GTFRTMPFILE ; rm $GTFRTMPFILE`

# Insert delivery rules here.

## otherwise, call the local delivery agent to handle writing system
## standard inbox.  HOWEVER, before the hand-off make sure to blat the
## gratuitous berkeley delimiter procmail insists on adding.  sheesh.
:0
| /usr/local/etc/tmail ${ENVELOPETO-dlm}
#!/bin/sh
#
# Convert the leading "From " line to Bezerk-From:
# Extract user+folder from Received: header to temp file.
# 
# Bug: could get wrong folder if no Bezerk header.
#

GTFRTMPFILE=${GTFRTMPFILE-/tmp/gtfrtmp.$$}

sed -e '1s/^From /Sendmail-From: /
1,2{
	t
	h
	s/^Received:.* for <*//
	tskip
	b
:skip
	s/;.*$//
	s/@.*>//
	w '$GTFRTMPFILE'
	x
}' 2> /dev/null