mailbox question
Raul A. Gallegos
raul at asmodean.net
Thu Oct 24 17:53:46 EDT 2002
I figured it out. I made a directory called scratch where I put the
main account directories, raul.act, asmodean.act, etc. Each of these
.act directories has subdirectories for each folder, like inbox.fld,
sent0.fld, trash.fld, etc. And under each of these subdirectories is
the list of messages all ending in .MSG along with some folder settings,
etc.
So the script below starts off at the root scratch dir and goes into
each directory doing it's magic.
#!/bin/sh
for ACCOUNT in home andy raul0 raul1 shannon ;do
cd $ACCOUNT
for FOLDER in `ls -d *.FLD` ;do
MBOXNAME=`echo "$FOLDER" |cut -d. -f1 |tr '[A-Z]' '[a-z]'`
cd $FOLDER
for msg in `ls *.MSG` ;do
echo "From import-from-pmmail at asmodean.net Thu Oct 24 00:00:00 CDT 2002" > temp-msg
cat $msg |sed 's/.$//' >> temp-msg
cat temp-msg >> $HOME/pink/$MBOXNAME-$ACCOUNT
rm temp-msg
done
cd ../
done
cd ../
done
Raul A. Gallegos said the following on Thu, Oct 24, 2002 at 02:00:25PM -0500:
> Hi guys. I have a lot of messages from pmmail 2000 style which I would
> like to use from mutt since that is the primary source of my mail
> management.
>
> The deal is that pmmail stores each message one file per message with
> .msg extention. What I did was wrote a loop script that cats the .msg
> files into one large mailbox file. Example:
>
> for msg in `ls *.MSG` ;do
> cat $msg >> mailbox-temp
> done
>
> Now I have mailbox-temp which I converted to Unix since it was in dos
> format.
>
> When I try to open this from mutt it gives me an error that the mailbox
> is invalid. I looked at the mailbox itself and I notice that each new
> message in mutt starts with the from line and the headers follow.
>
> With the one I created each one starts with Received: from
> I'm assuming that the correct format is to have the from be the first
> line so that it's a standard mailbox.
>
> I'm trying to use vi to search for a blank line then the word Received:
> in the body to replace it with the blank line and not the word received
> so the first part of a new message starts with from as in the working
> mailboxes I have.
>
> The keys I pressed to try and get it to do this are:
>
> esc : s/^$^V^MReceived:
>
> but it's not working. The control-v is so that i can just hit another
> sequence and the actual control code is put there. Any suggestions on
> how I can get rid of the word Received: but only when it's the firs
> word after a blank line?
>
> --
> Ever wonder if alternate worlds exist besides our own? Join the
> parallel-worlds mailing list to discuss this, and similar topics. click
> http://www.asmodean.net/cgi-bin/mailman/listinfo/parallel-worlds
> Raul A. Gallegos http://www.asmodean.net/contact.html
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
--
Ever wonder if alternate worlds exist besides our own? Join the
parallel-worlds mailing list to discuss this, and similar topics. click
http://www.asmodean.net/cgi-bin/mailman/listinfo/parallel-worlds
Raul A. Gallegos http://www.asmodean.net/contact.html
More information about the Speakup
mailing list