X-OfflineIMAP header

Johannes Stezenbach js at sig21.net
Tue Oct 5 11:55:28 BST 2010


On Mon, Oct 04, 2010 at 04:48:25PM -0500, John Goerzen wrote:
> On 10/04/2010 10:04 AM, Johannes Stezenbach wrote:
> >
> >Q: Why is it
> >       X-OfflineIMAP-random-stuff: more random stuff
> >    instead of
> >       X-OfflineIMAP: random-stuff + more random stuff
> >    ?
> 
> It made it easier to search for the one particular header desired.
> There could be multiple X-OfflineIMAP headers added if a message is
> moved beween folders more than once.  Then multiple headers would be
> returned and it would have to find the particular one it's
> interested in.  Not a big deal, just a hassle.

OK, but savemessage_searchforheader() does 'UID SEARCH HEADER <field-name> <string>'
(rfc3501 says "Messages that have a header with the specified field-name
and that contains the specified string in the text of the header").
So it should not matter whether the header name is unique or the header
value is unique, right?  The SEARCH command should return only one UID
in both cases unless the IMAP server is buggy.


> >BTW, where did the issue tracker go?
> 
> there's on on github.com/jgoerzen/offlineimap now.

Where? I can't find it :-(

> >Would you accept a patch to change the X-OfflineIMAP header format
> >or was there an issue with some IMAP servers which required
> >the current X-OfflineIMAP header format?
> 
> If I hadn't retired from maintaining OfflineIMAP, yes, of course.
> Right now nobody has as yet stepped up to maintain
> patchsets/branches/etc... maybe you are that person.... <hint hint>

I actually thought about it but I'm afraid all my spare time
is already used up by other activities.

> >However, in the -d imap debug log I found that the APPEND command returns
> >the new UID value, so the X-OfflineIMAP header isn't actually used
> >(UID SEARCH is never executed), thus I can't really test it...
> 
> APPEND is not guaranteed to do so, if memory serves.

That is true, but apparently both servers I use (the Exchange on
and Courier for my main account) return the UID after APPEND.

I actually thought about the following: If the server returns the
UID after APPEND, save the initial server greeting message
to a file in .offlineimap/Account-foo.  Then, on the next connection,
if the initial server greeting message matches, skip creating the
X-OfflineIMAP header altogether.
But I'm too lazy to implement and I'm not sure it is worth it.


Thanks
Johannes




More information about the OfflineIMAP-project mailing list