Subject: mh-style folders in pine?

From: [email-masked] (Eliot Shepard)
Date: Tue, 29 Nov 1994 19:29:57 GMT

Hello.

Does pine yet support mh-style folders for mail storage? ie. can a
folder be a directory off ~/mail and each message be an individual
file within, as opposed to all glommed together?

thanks,
Eliot

--
Eliot Shepard   Smithsonian Astrophysical Observatory   [email-masked]
#include <std/disclaimer.h>     http://hea-www.harvard.edu/~eliot/eshepard.html
sharing a cigarette with a leper, a cigar with a leperette           -pitchfork

---

From: [email-masked] (Matt Messina)
Date: 1 Dec 1994 03:24:56 GMT

>file within, as opposed to all glommed together?

Here is a script that creates an mbox from an mh folder.  It works on my
system -- I assume it works on any UN*X machine (I can't even type that
with a straight face :-)). 
--
Matt Messina
[email-masked]

#! /bin/sh
# packmbox - pack an MH folder back into a UUCP-style mbox
# @(#)$Id: packmbox.sh,v 1.16 1992/02/14 17:05:31 jromine Exp $
#
# Defaults:
#    `+folder'	defaults to current folder
#    `msgs' 	defaults to all
#
# Context:
#    Current-Folder
#
# for simplicity (and speed) we don't parse command-line args (much)
case $#/$1 in
   1/-h*) echo "syntax: packmbox [+folder] [msgs] [-help]" 1>&2; exit 0;;
esac

format="%(msg) From \
%<{return-path}%(putstr)%|\
%<(nonnull(mbox{from}))%(putstr)%|nobody%>@\
%<(nonnull(host{from}))%(putstr)%|nowhere%>%> \
%(day{date}) %(month{date}) %2(mday{date}) \
%02(hour{date}):%02(min{date}):%02(sec{date}) \
%(void(year{date}))%<(gt 100)%4(putnum)%|19%02(putnum)%>"

trap 'rm -f /tmp/packm$$; exit 1' 1 2 3 15

scan -noclear -noheader -noreverse -width 256 \
			-format "${format}" $* >/tmp/packm$$
# tricky -- you must do this "cd" after scan has updated the context
cd `mhpath`

exec </tmp/packm$$
rm -f /tmp/packm$$
while read m f
do
    echo "$f"
    sed -e '/^From /s/^/>/' < $m
    echo ""
done
exit