Subject: Re: How can I filter *existing* email?

From: Anthony Towns <[email-masked]>
Date: Sat, 5 Oct 1996 14:40:59 +1000

~Fake-From: Anthony Towns <[email-masked]>

-----BEGIN PGP SIGNED MESSAGE-----

[posted & mailed]

On 3 Oct 1996, Mike Carlson wrote:
>      Now with that out of the way...Is there any way to take one huge email
> box and split it into various folders?  I've managed to get procmail going
> just fine with new mail, but this old stuff just hangs out in one big blob.

You should have ``formail'' if you also have procmail. formail lets you
split a mailbox up into the component messages and pass them through
another program.

Assuming you have procmail set up to handle new mail properly,

$ formail < /mail/mike -s procmail -d mike

ie ``run the command [procmail deliver to mike] for each message in
[/mail/mike]''

> Also, since the folders already contain new email, is there a way to have
> it arrange them in the right date order?  (Thought I'd ask while I was at it.)

Sorry, but I can't help you on that one. Setting Pine's ``Sort order'' to
Date (as opposed to Arrival) gets most of it right, but odd date formats
still (used to? I upgraded to 3.95 yesterday. Maybe it works now) confuse
it.

Hope this helps,
aj

- --
Anthony Towns                      |  #include <disclaimer.h>
[email-masked]                   |  PGP Key: 0x7172DAED
http://student.uq.edu.au/~s343676  |  Life is not a matroid.

---

From: [email-masked] (Mike Carlson)
Date: 3 Oct 1996 01:33:11 -0700

I know, another filtering question. :(  In my defense, I have looked
at all the archives and procmail examples I could find before finally
asking here.

							Mike

---

From: Paul O Bartlett <[email-masked]>
Date: Thu, 3 Oct 1996 20:28:08 -0400

> just fine with new mail, but this old stuff just hangs out in one big blob.

    Somebody sent me the following shell script for rerunning procmail
against the Inbox.  I have never used it and cannot vouch for it.  Use
and/or adapt at your own risk.

#!/bin/sh
umask 077
lockfile -l3600 $HOME/.newmail.lock
lockfile -l3600 -ml
cat /usr/spool/mail/$LOGNAME >>$HOME/.newmail &&
cat /dev/null >/usr/mail/$LOGNAME
lockfile -mu
formail -s procmail <$HOME/.newmail
rm -f $HOME/.newmail $HOME/.newmail.lock
exit 0

> it arrange them in the right date order?  (Thought I'd ask while I was at it.)

    I don't know about this last one.

    (By the way, these really weren't Pine questions for this Pine
newsgroup.  There is a procmail mailing list for questions like these.)

Paul                             <[email-masked]>
----------------------------------------------------------
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP 2.6.2 public key 
Home Page:  URL: http://www.access.digex.net/~pobart

---

From: [email-masked] (Ramanuj Basu)
Date: Tue, 08 Oct 1996 16:35:58 GMT

I ran into similar problems when we moved from VMS Mail to Unix Pine.  I've had
success in getting messages to stay in proper order, without changing the
default sort option of "arrival," by:

 opening the folder (we'll call it "bob") I want to re-sort
 using "$d" to sort the messages (for this session only) by date
 using ";aastemp" to select all messages and move them all to a folder called
   "temp" - They are copied into the temp folder in the current sort order.
 using "gtemp" to go to temp
 using ";aasbob" to move the messages out of temp and back to bob, where they
   now show up in proper date order

I've had no problems with funky date formats from older messages, but I've read
here that others have.  Can't help with that, unless you want to manually edit
the mail file and "fix" the date headers so they're standardized!

-Ram
-- 
 Ramanuj Basu, Audience Services Coordinator & PC Systems Manager
 Caltech Public Events, Mail Code 332-92, Pasadena, CA 91125
 phone: 818-395-3667 - fax: 818-795-1378 - http://www.caltech.edu/~tickets/

>-----BEGIN PGP SIGNATURE-----
>Version: 2.6.3i
>Charset: ascii
>Comment: Public key available from http://student.uq.edu.au/~s343676

>iQCVAwUBMlXm5eRRvX9xctrtAQFmyAQArBBLslxVzELNKSprudQ9Kwle7iZuIbvx
>spzvuBmJBXvoaqkFj73ftpsj1M2HB/dQXEb8nO2GUAVZjw8JPeMEsXf4BaF6jrzU
>icwfrXBlNm+C9NnLdAyuVS+NeyTLJRFFfaAoB3kvSX27+Cy11jI0L/mIEuOIHV+g
>9X38xWsFBtY=
>=5ZQP
>-----END PGP SIGNATURE-----