unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@yhbt.net>
To: meta@public-inbox.org
Subject: [PATCH/RFC 0/2] recurse into message/rfc822 parts
Date: Sat, 16 May 2020 10:03:20 +0000	[thread overview]
Message-ID: <20200516100322.19793-1-e@yhbt.net> (raw)

Multipart parts aren't the only things which nest,
message/rfc822 attachments can contain any sort of full
message.

I noticed gmime supports this while evaluating(*) it to replace
Email::MIME, and it seems needed for IMAP support.

Email::MIME seemed to attempt to support descending into
message/*, but didn't do it properly, so it never got
triggered.

There's definitely some message/rfc822 attachments in various
archives out there, and it looks like message/global is becoming
a thing, and some message/news for legacy stuff...

gmime supports message/rfc2822, too, which doesn't seem
specified anywhere...

Search indexing multiple From/To/Cc/Subject/Message-ID/List-Id
headers is straightforward, Date is not...

Also, note the t/data/message_embed.eml example includes
a circular reference :)   I have no intention of doing threading
for attached messages (AFAIK no mail client does this), but
maybe making the contents of References / In-Reply-To is
a helpful thing in general.

Eric Wong (2):
  t/psgi_attach: assert message/* parts are downloadable
  descend into message/(rfc822|news|global) parts

 MANIFEST                     |   1 +
 lib/PublicInbox/Eml.pm       |  37 ++++++--
 lib/PublicInbox/MsgIter.pm   |   6 +-
 lib/PublicInbox/SearchIdx.pm |  47 ++++++----
 lib/PublicInbox/View.pm      |  30 ++++++-
 t/data/message_embed.eml     | 163 +++++++++++++++++++++++++++++++++++
 t/eml.t                      |  28 ++++++
 t/psgi_attach.t              |  27 ++++++
 t/search.t                   |  25 ++++++
 9 files changed, 336 insertions(+), 28 deletions(-)
 create mode 100644 t/data/message_embed.eml


             reply	other threads:[~2020-05-16 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 10:03 Eric Wong [this message]
2020-05-16 10:03 ` [PATCH 1/2] t/psgi_attach: assert message/* parts are downloadable Eric Wong
2020-05-16 10:03 ` [PATCH 2/2] descend into message/(rfc822|news|global) parts Eric Wong

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://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20200516100322.19793-1-e@yhbt.net \
    --to=e@yhbt.net \
    --cc=meta@public-inbox.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.
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).