Extra Header field

Stuart K. Bingë omicron-list at mighty.co.za
Mon Jul 12 19:37:35 CEST 2004


Hi Martin,

On Monday, 12 July 2004 18:40, Martin Konold wrote:
> > > Why don't you use the IMAP UID instead?
> >
> > Because it is not constant across object modification.
>
> Please explain this in more detail. I currently fail to understand why the
> UID in the Subject would solve that problem.

Please excuse me if I'm repeating information that you are already aware of - 
I'm just trying to present a complete picture here.

Once a UID is initially assigned to an object, it uniquely identifies that 
object over its lifetime. Throughout this period, due to modification of the 
object, it may be contained in several different IMAP messages, all with 
different IMAP UIDs. However, the UID that we assign to the object on its 
creation stays constant throughout all this - and this is in fact the only 
way I can reference that specific object.

When loading in the list of objects, all that I can do is pass Horde an array 
containing the UIDs of all the objects that were present, along with some 
cursory information about the objects so that a listing page can be 
displayed. Once Horde has generated this page, and a user clicks on an object 
of interest, Horde again calls my driver to "fully" load the object of 
interest - and all I am given to reference this object is its UID.

My scripts do not exist/are not running between these page loads, therefore 
for either of these calls I have no idea what was previously loaded. All I 
know is what I need to load.

Furthermore, when I modify a message (or any other client modifies it, for 
that matter), its IMAP UID changes - if this is the UID I then passed to 
Horde, and a user requests to view that specific object, I'll be stuck in the 
situation of loading the incorrect data *and* not knowing that I am doing so. 
This is why I need to ensure I have some sort of "true" UID that I can use to 
reference the object.

Having the UID in the subject would not solve the problem - that is what we 
have the <uid> tag in the XML definition for. The reason I would want the UID 
in the Subject or in an X-Header is purely for efficiency - both in my code 
and in terms of load on the server - as I can then IMAP SEARCH for the object 
of interest instead of having to manually parse every message in the mailbox 
to find the one I'm looking for. This is in fact very similar to the issue 
that Joon is having with the "content" header.

> Basically in order to have the full information about a calendar you need
> to read all messages and you must monitor all new messages. So how can you
> "loose" an IMAP UID?

I cannot monitor the mailbox. Every time a page, such as a mailbox listing 
page or a calendar view, is loaded, I have to then re-read the entire message 
list. I am given no knowledge about what has already been loaded, whether it 
was sufficient, whether anything has changed, etc. All I am told is "load 
everything" or "load the object with UID X".

>  After all there is no modification in IMAP only new and delete.

Exactly - you "modify" an object by creating a new one with the updated 
information, and delete the older one; with these operations you are then 
assigned a different IMAP UID for the same object, making it an essentially 
useless UID (for our purposes).

-- 
Stuart Bingë
Code Fusion cc.

Office: +27 11 673 0411
Mobile: +27 83 298 9727
Email: s.binge at codefusion.co.za

Tailored email solutions; Kolab specialists.
http://www.codefusion.co.za/




More information about the format mailing list