unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* associating a property with a subpart of a message
@ 2017-08-02 23:35 Daniel Kahn Gillmor
  2017-08-08 18:02 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kahn Gillmor @ 2017-08-02 23:35 UTC (permalink / raw)
  To: Notmuch Mail

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

hey folks--

I have some message properties i'd like to cache in notmuch that
strictly apply to specific subparts of the message.  (e.g. session keys
for an encrypted part, signature verification status of a signed part)

let's assume that for any given copy of a message, we have a reliable
"address" scheme for a part (e.g. "1.2.1.1").

However, this becomes confusing with multiple copies of a given message.
It's possible that one copy of the message has one MIME structure, but
mangling (by MTAs, mailing lists, etc) result in a different MIME
structure in another copy.

For cryptographic properties, it might be nice to associate a subpart
with a particular cryptographic digest of the subpart itself.

Alternately, from a filesystem perspective, maybe it would be better to
label the subpart based on the underlying physical file, and the
subpart's "address".

Are there other options?

If you wanted to associate a message property with a subpart of a given
message in a way that was reliable, especially in this new era of
multiple copies of a message, how would you do it?

         --dkg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: associating a property with a subpart of a message
  2017-08-02 23:35 associating a property with a subpart of a message Daniel Kahn Gillmor
@ 2017-08-08 18:02 ` David Bremner
  2017-08-11  4:49   ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2017-08-08 18:02 UTC (permalink / raw)
  To: Daniel Kahn Gillmor, Notmuch Mail

Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:

> hey folks--
>
> I have some message properties i'd like to cache in notmuch that
> strictly apply to specific subparts of the message.  (e.g. session keys
> for an encrypted part, signature verification status of a signed part)
>
> let's assume that for any given copy of a message, we have a reliable
> "address" scheme for a part (e.g. "1.2.1.1").
>
> However, this becomes confusing with multiple copies of a given message.
> It's possible that one copy of the message has one MIME structure, but
> mangling (by MTAs, mailing lists, etc) result in a different MIME
> structure in another copy.
>
> For cryptographic properties, it might be nice to associate a subpart
> with a particular cryptographic digest of the subpart itself.
>
> Alternately, from a filesystem perspective, maybe it would be better to
> label the subpart based on the underlying physical file, and the
> subpart's "address".

A hybrid option would be to use a hash of the file + 1.2.1.1. address
scheme. My thinking here is a bit vague, but I can imagine such has hash
being useful either for content addressible mailstore, or for
disambiguating message-id collisions.

d

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: associating a property with a subpart of a message
  2017-08-08 18:02 ` David Bremner
@ 2017-08-11  4:49   ` Daniel Kahn Gillmor
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Kahn Gillmor @ 2017-08-11  4:49 UTC (permalink / raw)
  To: David Bremner, Notmuch Mail

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

On Tue 2017-08-08 14:02:56 -0400, David Bremner wrote:
> A hybrid option would be to use a hash of the file + 1.2.1.1. address
> scheme. My thinking here is a bit vague, but I can imagine such has hash
> being useful either for content addressible mailstore, or for
> disambiguating message-id collisions.

hm, interesting.  That would mean that you'd basically never get to
confidently reuse properties (because every copy of a mail you get
likely differs by some received headers), whereas for some normal mails
where you get multiple copies if you were just hashing the part then
you'd get the same thing.  otoh, if you're going to hash a part, that
raises the question of whether you're hashing the headers as well as the
body of that part, and its possible that those headers are being
rewritten someplace.

I suppose the other approach would be to just opportunistically try the
cached data as long as the message-id is the same thing, though.

is there an easy way to get the hash of the file that contains the
message from notmuch automagically?  do we need to worry about mbox
files as well?

I welcome any other ideas or suggestions!

  --dkg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-11  6:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 23:35 associating a property with a subpart of a message Daniel Kahn Gillmor
2017-08-08 18:02 ` David Bremner
2017-08-11  4:49   ` Daniel Kahn Gillmor

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).