jadolg / webpymail

Automatically exported from code.google.com/p/webpymail
GNU General Public License v3.0
0 stars 0 forks source link

Re: and Fwd: translation in subject #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Maybe it's not very good idea to translate 'Re:' and "Fwd:" prefixes for 
subjects when creating reply and forwarded messages? (I mean maybe there should 
be no Lazy translator over it)

At least because THREAD extension requires this prefixes to gather messages in 
threads.

Original issue reported on code.google.com by akimov.alex on 27 Sep 2010 at 2:51

GoogleCodeExporter commented 9 years ago
That's not the best way to thread the messages. The language of the prefix is 
not very important (we can count the prefixes and see if they are the same 
across messages), if we have for instance:

Subject A           date 1
RR: Subject A       date 4
RR: Subject A       date 2  
RR: RR: Subject A   date 3
RR: RR: Subject A   date 5

We get:

Subject A           date 1
    RR: Subject A       date 2   
       RR: RR: Subject A   date 3
       RR: RR: Subject A   date 5
    RR: Subject A       date 4

I'm sure you can find the flaw, the reply made on date 5 can be an answer to 
the message from date 2 or 4. 

It's best to use the following message headers to calculate the threads 
structure: 

References: <message_id_1>
In-Reply-To: <message_id_1>
Message-Id: <message_id_2>

You can check RFC5256 (IMAP - SORT and THREAD Extensions) where you can find a 
description of the common used threading algorithms. 

We have the hlimap lib ready to do the client side threading, but it's not 
implemented yet. To sort the messages we have similar infra-structure, this is 
already done.

Summary: The prefix language have no influence in the threading algorithm. 
Threading by subject is bad. Client side threading will be supported on hlimap. 
I prefer to have it done server side.

Original comment by hguerreiro@gmail.com on 27 Sep 2010 at 7:51