lindex has asked for the wisdom of the Perl Monks concerning the following question:

I have recently been working on a script that prints out
a table of subjects+authors+date's of emails. Now Iam still
working on the "threading" code for this email parser, and one
question comes to mind, what is the best way to thread email?
Does everyone just do matching of Re: "subject" and match "subject"
to another subject on there lists of emails?
Has anyone else had any xp with this?




lindex
/****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/

Replies are listed 'Best First'.
Re: Email Threading ?
by Cirollo (Friar) on Aug 14, 2000 at 17:03 UTC
    It may be a bit overkill for your purposes, but you might get some ideas from this threading algorithm, by Jamie Zawanski.

    He says, "In this document, I describe what is, in my humble but correct opinion, the best known algorithm for threading messages." {grin}

      Very interesting thank you :)



      lindex
      /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/
Re: Email Threading ?
by Anonymous Monk on Aug 14, 2000 at 22:22 UTC
    lindex, I have a script that parses email, it grabs all the relavant fields (To, From, CC, BCC, Subject, Body) and inserts them into a database, where the messages are 'reconstructed' as comments for anyone to view. It is a script I 'inherited' and am looking for help with because currently it cannot handle messages sent via MS Outlook (Outlook does not use quote characters around the From field to my knowledge), but works great on all mail sent via Lotus Notes 4.6a (which _does_ use quotes in the From field in its headers). So I have hunting for Perl Gurus that can help me edit the script to parse any message, regaurdless of quotes or not. I would be happy to share it with you, and maybe you can give me some advice on my problem in return. Let me know if you are interested. Thanks! -Jim H.
      I accually have written such a script my self and posted it here
      I use the Mail::* modules to handle all my mail parsing (very simple & keeps me sane)
      The issue Iam having is parsing the email in such a way that I dirive threads from said email



      lindex
      /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/