On Fri, Oct 10, 2003 at 12:08:39PM +0200, Shachar Shemesh wrote:
> hi all,
> 
> Can anyone recommend an mbox manipulation library for me? I need to 
> compare, merge, split, etc. several mbox files, which have some overlap.
> 
> On a very related note - I have a reasonable coverage of Linux-IL since 
> about 1995. If anyone has anything dating further back, please contact 
> me. Otherwise, unless I manage to put the archives online and people 
> find their wonderful flame from January 1996 missing, things should 
> pretty much be complete.
> 
>             Shachar

While tools such as formail, grepmail, etc do exist, a more powerful
approach could be taken by using Python:

 >>> from mailbox import PortableUnixMailbox
 >>> mbox = PortableUnixMailbox(file("/var/spool/mail/yotam"))
 >>> messages = [message for message in mbox]
 >>> ...

I don't know of any Python facilities that recognize header structure
and filter accordingly, but it should be relatively easy to implement,
and the gain is likely to be more signifcant than using a combination of
ready made standalone programs, through which complex operations may be
harder to carry out.

        Regards,
                Yotam Rubin

Attachment: signature.asc
Description: Digital signature

Reply via email to