Complete.Org: Mailing Lists: Archives: offlineimap: July 2007:
Re: why not use IMAP FLAGS?
Home

Re: why not use IMAP FLAGS?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thomas Viehmann <tv@xxxxxxxxxx>, offlineimap list <offlineimap@xxxxxxxxxxxx>
Subject: Re: why not use IMAP FLAGS?
From: Florian Friesdorf <flow@xxxxxxxx>
Date: Wed, 25 Jul 2007 14:44:47 +0200

On Wed, Jul 25, 2007 at 12:08:31PM +0200, martin f krafft wrote:
> [CC'ing the offlineimap list]
> Context: Thomas suggests to use IMAP flags to solve the problems
> I highlight in
> http://blog.madduck.net/geek/2007.07.24_a-user-space-filesystem-for-mail-labeling
> 
> also sprach Thomas Viehmann <tv@xxxxxxxxxx> [2007.07.25.0849 +0200]:
> > I don't know about procmail, but AFAIK sieve does. Cyrus used to have a
> > delivery option to set flags, but I don't know much about server-side
> > filtering (I'm trying to find time to check out sieve properly).
> > AFAICT, offlineimap at least deals with the system flags (\\answered et
> > al), so it should be fairly easy to deal with custom flags if it doesn't
> > already.
Currently it doesn't and uses a translation table from IMAP flags to their
maildir correspondent: IMAP uses words, while maildir uses letters.

> > (..)
> 
> This is, no doubt, interesting; however, even if offlineimap would
> learn to support arbitrary flags, how would it represent those on
> the filesystem in a way to make mail readers be able to deal with
> them in such a way that a sinlge message is never cloned just
> because it has multiple tags?

So in IMAP a tag would be stored as keyword I_am_a_tag (didn't check whether it
may contain spaces). Maildir also allows custom flags (see [1]), however, they
are limited to one character.

A solution might be extended attributes see [2], they are supported on a wide
range of filesystems of different operating systems. However, support for them
must be enablade in the kernel (module). (Is this the case on widely spread
distributions? I'm compiling it in since years, wondering what I could do with
it ;)

The extended attributes are name:value pairs, which enable different namespaces,
already in use by a variety of applications ([3]). For an old-school mail
program, they are invisible. Worst that can happen: it deletes them while
copying a file, but that's basically up to you and the mail program you are
using, it will certainly not interfere with duplication checking.

offlineimap would need patching to save IMAP keywords in extended attributes
([4]), and mail clients would need to read and set those extended attributes.

-flo


[1] http://cr.yp.to/proto/maildir.html
[2] http://en.wikipedia.org/wiki/Xattr
[3] http://www.freedesktop.org/wiki/CommonExtendedAttributes
[4] http://pyxattr.sourceforge.net/

-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7-ecc0.1.6 (GNU/Linux)

iD8DBQBGp0W/gqFlIkofQ2cRAi0EAJ41LIPwrX+ih/lwZOcOnh8qb4XxUQCdGPzq
2cgtXZeF68RjPqOryodAOfk=
=c48x
-----END PGP SIGNATURE-----




[Prev in Thread] Current Thread [Next in Thread]