473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Building email threads from unix mailboxes

What headers to I have to know about to build thread trees from Unix
mailboxes?

Is it enough to get the In-Reply-To header for each message and build a
dictionary of { Message-ID: message } pairs? Or is it more complicated
than that?

If there isn't already a module to do this (and apologies if there is
one and I don't know about it), are the current tools of choice the
'email' and 'mailbox' modules? (And I guess I'd want to use the mime
decoding tools in 'email' to deal with messages that come with
attachments or html or other stuff.)

Thanks for any tips,

Jed

Jul 18 '05 #1
6 2226
> Is it enough to get the In-Reply-To header for each message and build a
dictionary of { Message-ID: message } pairs? Or is it more complicated
than that?


To be RFC 2822 compliant, In-Reply-To and References are sufficient.
Other clients may add more headers, and not all clients are RFC 2822
compliant.

- Josiah

Jul 18 '05 #2

Thanks.

Is the References header a running list of all the In-Reply-To headers
so far in the thread?

Jul 18 '05 #3
Jed Parsons wrote:
Is the References header a running list of all the In-Reply-To headers
so far in the thread?


It depends on the service. Some only keep a few of the last references,
some only one, some retain the full list from the very beginning (at
least as far as the RFC will allow).

Probably if you wanted to handle robust threading, you'd want to go by
In-Reply-To and References, backtracking manually (rather than relying
on any given References list to be complete), and then, for systems like
mail-to-news gateways which may break the In-Reply-To/References chain,
group by similar subjects posted around the same time.

--
__ Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ Love is the triumph of imagination over intelligence.
-- H.L. Mencken
Jul 18 '05 #4

On Oct 19, 2004, at 11:24 AM, Jed Parsons wrote:
What headers to I have to know about to build thread trees from Unix
mailboxes?

Is it enough to get the In-Reply-To header for each message and build a
dictionary of { Message-ID: message } pairs? Or is it more complicated
than that?
<http://www.jwz.org/doc/threading.html> has a good write-up about the
threading algorithm used by Netscape Mail and News 2.0 and 3.0, and
Grendel (<http://www.mozilla.org/projects/grendel/>). Jamie Zawinski
was responsible for the design of Netscape Mail and News 2.0 and 3.0.
If there isn't already a module to do this (and apologies if there is
one and I don't know about it), are the current tools of choice the
'email' and 'mailbox' modules? (And I guess I'd want to use the mime
decoding tools in 'email' to deal with messages that come with
attachments or html or other stuff.)
A.M. Kuchling has made a Python implementation of JWZ's algorithm
available at <http://www.amk.ca/python/code/jwz>.
Thanks for any tips,

Jed


Regards,

Mark Rowe
<http://bdash.net.nz/>

Jul 18 '05 #5
Awesome! Thanks so much.

j

Jul 18 '05 #6
In article <10**********************@z14g2000cwz.googlegroups .com>,
"Jed Parsons" <je**@ilm.com> wrote:

[Apologies if this arrives twice; my news server appears to have dropped
my initial post.]

The best algorithm for threading email messages I've seen is Jamie
Zawinski's. It's at:

http://www.jwz.org/doc/threading.html

I have an implementation in Python that's linked from:

http://www.mondoinfo.com/blog/C18226...988/index.html

Regards,
Matt
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Laszlo Zsolt Nagy | last post by:
Hi All, I need to create a daemon that sits on a server and forwards some e-mails. (Well not only that, it needs to change header information before forwarding and also insert messages into a...
3
by: sfeil | last post by:
I'm writing a program in python to sort the mail in standard Unix email boxes. In my "prof of concept" example I am coping a letter to a second mailbox if the letter was send from a particular...
1
by: Sori Schwimmer | last post by:
Hi, I am working on an application which involves interprocess communication. More to the point, processes should be able to notify other processes about certain situations, so the "notifyees"...
2
by: Nikola Milutinovic | last post by:
Hi guys. Building 7.4 "as we speak". I've run into one minor building bug. HW: DEC AlphaStation 200 OS: Digital UNIX 4.0D + SP9 PG: 7.4 sources When I choose to build "with threading...
2
by: anand.ba | last post by:
Hi all I need to find equivalent windows libraries for the following unix ones. #include <sys/prctl.h> #include <sys/ioctl.h> #include <unistd.h>
35
by: Carl J. Van Arsdall | last post by:
Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? ...
24
by: Poly-poly man | last post by:
I'm a total newbie to threads, but am generally good with c. I'm trying to run a program that might take a while, but system by itself does not return until the program is finished. I thought that...
7
by: Cecil1984 | last post by:
hi guys, could any one help me how to write perl script to send email in unix system. thank you for any helping.
1
by: sj7272 | last post by:
Hi, I am building email marketing framework, my email templates go out to clients and I wish to include a "send to a friend" or "forward to a friend" link in the outbound email. I want to track...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.