unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: martin f krafft <madduck@madduck.net>
To: mailtags discussion list <mailtags@lists.madduck.net>,
	notmuch discussion list <notmuch@notmuchmail.org>
Subject: Re: Idea for storing tags
Date: Wed, 13 Jan 2010 14:24:04 +1300	[thread overview]
Message-ID: <20100113012404.GA570@lapse.rw.madduck.net> (raw)
In-Reply-To: <F3C2A2F4-515E-4919-9163-6958C2FAA2C5@indev.ca>

[-- Attachment #1: Type: text/plain, Size: 4873 bytes --]

also sprach Scott Morrison <smorr@indev.ca> [2010.01.12.1711 +1300]:
> 1.  synchronization of tag data with emails -- if they are in
> a subfolder then it presents the issue of maintaining this
> subfolder when managing emails (moving, deleting, duplicating etc)
> and any .tag folder unaware clients are likely cause an breakage
> in tagdata/message association.  One way of doing this is to have
> a global .tag folder.

A global .tag folder indexed by e.g. message ID, as you state later,
would probably allow for this. Or a file-per-tag design. We'd have
to think carefully about pros and cons for each.

When thinking about this, I always have to remind myself that we are
targetting this at a design that has indexed search. If that weren't
the case, searches would be incredibly expensive.

Maybe a better approach would be content addressing (see below).

> 2. what happens if that message is archived or moved to an
> exclusively local cache -- eg. Mail.app on OS X can easily move
> IMAP messages to a folder resident on the computers computers?

Well, if the target can store tags, then ideally the MUA should know
how to transfer them along.

Maybe the right thing to do would be to use extended attributes
(which are stored in the inode!), even if they may not be
universally supported yet. If our solution scales, then this might
lead to a significant increase in xattr adoption.

> 3. what happens with duplicates of emails -- I would assume that
> the message id would be the key to match the tag data to the
> message.  In this system a duplicate of a message could not have
> a different set of tags from the original (not that this would
> necessarily be desirable.)

Duplicates need folders, and tags and folders are somewhat at odds
with each other. I mean, you can represent a folder hierarchy with
tags (and more), and if you have tags and folders, you are
potentially introducing a level of confusion/ambiguity that we don't
want in the first place. Maybe the ideal solution doesn't need
folders anymore (and IMAP-compatible (Maildir) subfolders have
always been a hack anyway).

There are also two types of duplicates: copies and links. The former
can diverge, the latter can't. I don't really see a reason for
either. It's not like you need to copy a mail before you edit it,
and I don't see a real reason for linking, assuming that the primary
means of browsing will be tag-searches anyway.

Duplicates always make me think of content addressing, like Git's
object cache. We could store the content hash of a message in its
filename, and also use the hash to index into the tag database.
I think that would be much cleaner than message IDs, and would make
handling true duplicates (links) much easier, while copies (diverged
ex-duplicates) would also be taken care of automatically.

> Your mention of potential leakage (aka inadvertent disclosure of
> tag data) is real -- but only if the client used to bounce/forward
> is not the one to tag the message (one would assume that if
> a client can tag, it can know to exclude the tags in a bounce.)

True, and it's probably the minority of people using multiple
clients. But those who do might also manipulate mail with sed and
use sendmail directly.

I don't think we can successfully enhance RFC 5351 to make MTAs
always ditch the Tags:-header.

> Mail.app -- which I am pluging into does not forward headers --

ew! ;) (I think one should be able to forward pristine mails)

> though it will include all headers in a bounce -- but chance are
> you aren't tagging messages you are bouncing.:)

That chance might well be very low. I bounce/forward-as-attachment
a lot of mail from the past to make it easier for others to
establish context.

> The performance issue is very real -- because it means that
> somehow messages have to rewritten to the IMAP server -- IMAP
> doesn't have a mechanism AFAIK for updates.

Not even UIDPLUS?
http://wiki.dovecot.org/FeatUIDPLUS

> Additionally, IMAP doesn't have a mechanism for simply replacing
> one message data with another -- a new message must be written and
> the old message must be deleted and the message IMAP UID will
> change, and the client will have to deal with this especially if
> it is cache the messages.

Yes, I am experiencing this pain regularly, since I currently use
a lot of message rewriting as part of my workflow — one of the
reasons why I'd like to find an alternative.

> Also GMAIL IMAP is an issue-

Yeah, I bet. Is there anyone who doesn't think that that's Google's
problem, not ours, though?

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"there's someone in my head but it's not me."
                        -- pink floyd, the dark side of the moon, 1972
 
spamtraps: madduck.bogus@madduck.net

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-01-13  1:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 22:19 Idea for storing tags martin f krafft
2010-01-12  3:44 ` Scott Robinson
2010-01-12  4:06   ` martin f krafft
2010-01-12  4:51   ` Potential problem using Git for mail (was: Idea for storing tags) martin f krafft
2010-01-12 19:38     ` Jameson Rollins
2010-01-12 19:55       ` martin f krafft
2010-01-14  8:12     ` Asheesh Laroia
2010-01-14 20:37       ` martin f krafft
2010-01-21  6:28         ` Asheesh Laroia
2010-01-25  0:46           ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-25  5:19             ` Asheesh Laroia
2010-01-25  7:43               ` martin f krafft
2010-01-25 13:49             ` Sebastian Spaeth
2010-01-25 16:22               ` Mike Kelly
2010-01-25 21:46                 ` tag dir proposal [was: Re: Git as notmuch object store] Jameson Rollins
2010-01-26 16:32                   ` Scott Robinson
2010-01-26 17:03                     ` Jameson Rollins
2010-01-28  5:12                       ` martin f krafft
2010-01-28  5:28                         ` James Westby
2010-01-28  5:34                           ` martin f krafft
2010-01-28  6:22                             ` James Westby
2010-01-28  9:55                             ` martin f krafft
2010-01-28  5:10                   ` martin f krafft
2010-01-28 12:32                     ` Servilio Afre Puentes
2010-01-28 20:39                       ` martin f krafft
2010-01-28 20:49                         ` Ben Gamari
2010-01-28 21:11                           ` martin f krafft
     [not found]                             ` <1264713802-sup-620@ben-laptop>
     [not found]                               ` <20100128221735.GE8942@lapse.rw.madduck.net>
2010-01-28 23:30                                 ` Ben Gamari
2010-01-28 21:16                           ` Jed Brown
2010-01-25 19:49               ` Git as notmuch object store (was: Potential problem using Git for mail) martin f krafft
2010-01-27  9:00               ` Sebastian Spaeth
2010-02-15  0:51             ` Stewart Smith
2010-01-12  4:11 ` Idea for storing tags Scott Morrison
2010-01-13  1:24   ` martin f krafft [this message]
2010-01-13  5:39     ` Scott Morrison
2010-01-13  5:52       ` martin f krafft
2010-01-14  1:37       ` Carl Worth
2010-01-12 21:39 ` David A. Harding
2010-01-14  1:32 ` Carl Worth
2010-01-14  8:04   ` martin f krafft
2010-01-14 22:24     ` Carl Worth
2010-01-14 22:32       ` martin f krafft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100113012404.GA570@lapse.rw.madduck.net \
    --to=madduck@madduck.net \
    --cc=mailtags@lists.madduck.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).