On Mon, 2004-04-19 at 21:39, Rajarshi Guha wrote:

> > Mail Subject: "Your article to EPW"
> > with attachments article.doc
> > 
> > should be saved as "Your article to EPW".dd-mm-yyyy.txt
> > with atttachment as "Your article  to EPW".article.doc
> > 
> > He approached me for a solution and to be frank i was stumped. Except 
> > for saving each mail by hand using pine commands was the only solution 
> > that i could offer. Anyone knows of any solution? Script, tool, 
> > suggestions etc. all welcome.
> > 
> 
> IIRC Pine stores its mail in maildir format. 

??

No pine doesn't store its mails in Maildir format all the time. Delivery
of e-mail in a Maildir or Mailbox or mbox is decided by the MTA or the
Mail Server. Pine is a mail client which can retrieve e-mails from
either of these locations. You have got to find out where the mails are
stored whether ~/Maildir/ or /var/spool/mail. 

If its ~/Maildir/ you  already have all your e-mails as separate files
and all you have to do is search for the "Subject:" and "Date" header
and copy the file with the new name over to your storage location.

For mbox What I can suggest is writing a simple perl script ( even shell
will do the job), and making a Regular Expression Search for the headers
"From:" "Subject" and "Date' and saving the lines in between as separate
files.

You can also get some mbox parsers on the internet, or write one with
Flex/Bison and some C, to get this done.

For decoding the Base64 encoded Attachment you can use the base64
package and save it as another file.

HTH,
Cheers,
Animesh

-- 
Animesh Bansriyar <[EMAIL PROTECTED]>
http://neolinuxsolutions.com, +91-651-3112497, 3122401.

Linux Intranet/Internet Servers, Specialised E-mail Setups, 
Enterprise Database and Directory Services, Linux Application 
Development and Commercial Support for Free/OpenSource Software


--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3

Reply via email to