473,795 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2251
> 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************ **********@z14g 2000cwz.googleg roups.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
1404
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 database). The mailbox module is fine but I do not see a way to delete/add messages - it is ready only. The other possiblity is IMAP4 but it is bad because my program should not store passwords for all users. I can only see one solution right now:
3
1917
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 email address. When I read the destination mailbox with cat, I can see that something is getting copied to it, but the mail program does not recognize any new letters in the destination mailbox. It would seam that the...
1
1863
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" would be able to act in certain ways. As processes are distributed on several machines, in different physical locations, my thinking was:
2
1620
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 support", "configure" selects following from OSF1 template:
2
6052
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
4044
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? I've been leaning towards threads, I'm going to say why. Processes seem fairly expensive from my research so far. Each fork copies the entire contents of memory into the new process. There's also a more expensive context switch between...
24
2412
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 threads would work, because I could send system to run on a thread then continue with the program. I attempted, but it seems too act exactly like just running "system" byu itself, but it gives me a Segmentation Fault and exits. Can someone PLEASE...
7
1699
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
3133
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 the numbers that take this option, which is no problem, I would just like some guidance on the php mail component of the scripting as I can grab code snippets for the web landing page form. Any guidance appreciated. Thx, Simon
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.