Re: Perl to process "mbox" file
- From: Shankar <simopt@xxxxxxxxx>
- Date: Mon, 28 Dec 2009 14:40:29 -0800 (PST)
On Dec 28, 3:48 pm, Steve C <smallp...@xxxxxxxx> wrote:
Shankar wrote:
Hello,
Can someone please point me to a way to accomplish the following task.
I have made a copy of my "mbox" file in my AIX account, for processing
as follows.
I w'd like to automate:
1. Run through the mbox copy, and for each mail, using some logic on
fields like From, Date/Time, Subject, decide whether or not it is a
mail of interest.
2. If it is a mail of interest, examine whether or not it has
attachments. Then, save the attachments to a directory.
The attachments w'd be of type: *.txt, *.ps, *.pdf, *.doc
I have used PERL in the distant past for scripting on Unix, so thought
of going back to PERL.
I was hoping the PERL gurus w'd point me to a way to accomplish the
above, which I w'd have to do manually otherwise. The number of mails
in the mbox is quite large, so wish to automate.
There are many CPAN modules dedicated to handling and parsing mail,
so you won't need to start from scratch.
I see Mail::MboxParser which claims to properly handle attachments
of mail in an MBox file, but you should look through some of the
others.
Thanks Steve and Jochem.
I'll take a look at the above.
Upon digging around further, I also came across:
http://perl.overmeer.net/mailbox/html/manuals/index.html
Thanks,
Shankar
.
- References:
- Perl to process "mbox" file
- From: Shankar
- Re: Perl to process "mbox" file
- From: Steve C
- Perl to process "mbox" file
- Prev by Date: Re: Perl to process "mbox" file
- Next by Date: FAQ 8.31 Can I use perl to run a telnet or ftp session?
- Previous by thread: Re: Perl to process "mbox" file
- Next by thread: Re: Perl to process "mbox" file
- Index(es):
Relevant Pages
|