splitting Mbox file thread-sorted

View: New views
9 Messages — Rating Filter:   Alert me  

splitting Mbox file thread-sorted

by Matthias Apitz-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

Is there some tool or something in the ports which could split a Mbox
file into various pieces, but having the threads together? I could do
it by hand with mutt, but I think it must be some tool for this too;
Thx

        matthias
--
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@...> - w http://www.unixarea.de/
Vote NO to EU The Lisbon Treaty: http://www.no-means-no.eu
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by jhell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Thu, 5 Nov 2009 08:13, guru@ wrote:

>
> Hello,
>
> Is there some tool or something in the ports which could split a Mbox
> file into various pieces, but having the threads together? I could do
> it by hand with mutt, but I think it must be some tool for this too;
> Thx
>
> matthias
>


     To my best belief mail/procmail should be able to do what you want
with the proper recipe and then just re-filtering your mail from your
mbox.

Best of luck.

--

  Thu Nov  5 12:18:27 2009 -0500

  jhell
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by PuffyBSD :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 5, 2009 at 11:20 AM, jhell <jhell@...> wrote:

>
> On Thu, 5 Nov 2009 08:13, guru@ wrote:
>>
>> Hello,
>>
>> Is there some tool or something in the ports which could split a Mbox
>> file into various pieces, but having the threads together? I could do
>> it by hand with mutt, but I think it must be some tool for this too;
>> Thx
>>
>>        matthias
>>
>
>
>    To my best belief mail/procmail should be able to do what you want with
> the proper recipe and then just re-filtering your mail from your mbox.

if anyone could post a procmail recipe that would be GREAT. I have
been wanting to do this.

Sam Fourman Jr.
Fourman Networks
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Pete-129 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sam Fourman Jr. wrote:

> On Thu, Nov 5, 2009 at 11:20 AM, jhell <jhell@...> wrote:
>> On Thu, 5 Nov 2009 08:13, guru@ wrote:
>>> Hello,
>>>
>>> Is there some tool or something in the ports which could split a Mbox
>>> file into various pieces, but having the threads together? I could do
>>> it by hand with mutt, but I think it must be some tool for this too;
>>> Thx
>>>
>>>        matthias
>>>
>>
>>    To my best belief mail/procmail should be able to do what you want with
>> the proper recipe and then just re-filtering your mail from your mbox.
>
> if anyone could post a procmail recipe that would be GREAT. I have
> been wanting to do this.
>
> Sam Fourman Jr.
> Fourman Networks

Dunno about procmail, but it's easy to resort with maildrop:

  reformail -s maildrop < mbox_file

will cause the whole mbox_file to be broken into individual
messages that are then (re)processed by your current maildrop
configuration (using your current .mailfilter). The reformail program
comes with maildrop; see the man page.


_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Matthias Apitz-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

El día Thursday, November 05, 2009 a las 04:41:46PM -0800, Pete escribió:

> >>> Is there some tool or something in the ports which could split a Mbox
> >>> file into various pieces, but having the threads together? I could do
> >>> it by hand with mutt, but I think it must be some tool for this too;
> >>> Thx
> >>>
> >>>        matthias
> >>>
> >>
        ...
>
>   reformail -s maildrop < mbox_file
>
> will cause the whole mbox_file to be broken into individual
> messages that are then (re)processed by your current maildrop
> configuration (using your current .mailfilter). The reformail program
> comes with maildrop; see the man page.

I have no reformail(1) or maildrop(1) installed; so I checked the man
page here: http://www.courier-mta.org/maildrop/reformail.html
and understand what the above is doing (breaking the mbox into single
mails and piping them again through a local MDA maildrop(1)).

But this is not I was looking for. I want to break a big mbox file into
pieces of lets say 1000 mails, and not in the order the mails are in the
source file, but thread sorted; i.e. if the 1st and the last mail of
this big 10.000 mbox file belong to one thread, they should be in one
file;

don't see how this would be possible with maildrop(1); any idea is
welcome;

        matthias
--
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@...> - w http://www.unixarea.de/
Vote NO to EU The Lisbon Treaty: http://www.no-means-no.eu
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Karl Vogel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> On Thu, 5 Nov 2009 14:13:39 +0100,
>> Matthias Apitz <guru@...> said:

M> Is there some tool or something in the ports which could split a Mbox
M> file into various pieces, but having the threads together?

   Mail::Thread is a Perl implementation of Jamie Zawinski's mail threading
   algorithm, as described by http://www.jwz.org/doc/threading.html.
   See http://search.cpan.org/ to track it down.

--
Karl Vogel                      I don't speak for the USAF or my company
Cute Celebrity Couple Names #4:     Naomi Watts + Paul Newman = WattsNew
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Matthias Apitz-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

El día Sunday, November 08, 2009 a las 08:38:15PM -0500, Karl Vogel escribió:

> >> On Thu, 5 Nov 2009 14:13:39 +0100,
> >> Matthias Apitz <guru@...> said:
>
> M> Is there some tool or something in the ports which could split a Mbox
> M> file into various pieces, but having the threads together?
>
>    Mail::Thread is a Perl implementation of Jamie Zawinski's mail threading
>    algorithm, as described by http://www.jwz.org/doc/threading.html.
>    See http://search.cpan.org/ to track it down.

Hello Karl,

Thanks for the pointer to that piece of code; do you know if there is
some implementation of this into a cmdline tool for splitting a Mbox
based on this Perl methods? Thx

        matthias
--
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru@...> - w http://www.unixarea.de/
Vote NO to EU The Lisbon Treaty: http://www.no-means-no.eu
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Karl Vogel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> On Mon, 9 Nov 2009 09:37:30 +0100,
>> Matthias Apitz <guru@...> said:

M> Thanks for the pointer to [Mail::Thread]; do you know if there is some
M> implementation of this into a cmdline tool for splitting a Mbox based on
M> this Perl methods?

   Unfortunately, I haven't been able to find a decent example for either
   the Perl or Python implementation of JZ's threading method.

   I'm going to be archiving a lot of mail in the near future, so I'll try
   something really slimy and see if it works: install Mailman, import some
   mbox files, and see if I can use pipermail to generate the threading
   information I need.

--
Karl Vogel                      I don't speak for the USAF or my company
If men ruled the world #4: Instead of beer belly, you'd get "beer biceps."
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: splitting Mbox file thread-sorted

by Jason Helfman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This may be helpful. I used this many years ago, and it worked great.
http://mboxgrep.sourceforge.net/

mail/mboxgrep

-jgh

On Mon, Nov 09, 2009 at 08:37:29PM -0500, Karl Vogel thus spake:

>>> On Mon, 9 Nov 2009 09:37:30 +0100,
>>> Matthias Apitz <guru@...> said:
>
>M> Thanks for the pointer to [Mail::Thread]; do you know if there is some
>M> implementation of this into a cmdline tool for splitting a Mbox based on
>M> this Perl methods?
>
>   Unfortunately, I haven't been able to find a decent example for either
>   the Perl or Python implementation of JZ's threading method.
>
>   I'm going to be archiving a lot of mail in the near future, so I'll try
>   something really slimy and see if it works: install Mailman, import some
>   mbox files, and see if I can use pipermail to generate the threading
>   information I need.
>
>--
>Karl Vogel                      I don't speak for the USAF or my company
>If men ruled the world #4: Instead of beer belly, you'd get "beer biceps."
>_______________________________________________
>freebsd-questions@... mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."
>
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."