unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "David Bremner" <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: WIP: filter out envelope headers in notmuch-insert.
Date: Tue, 15 Feb 2022 09:23:59 +1100	[thread overview]
Message-ID: <164487743989.17471.15302582357377741383@noble.neil.brown.name> (raw)
In-Reply-To: <87h791wvdh.fsf@tethera.net>

On Mon, 14 Feb 2022, David Bremner wrote:
> "NeilBrown" <neilb@suse.de> writes:
> 
> > On Sat, 12 Feb 2022, David Bremner wrote:
> >> This is a bit rough and ready, but before I fine tune it, I want to
> >> make sure the overall idea of stripping envelope headers in
> >> notmuch-insert makes sense.
> >
> > I think that it would be highly inappropriate to modify the message
> > passed to notmuch-insert AT ALL.
> > It *might* be appropriate to check that it looks generally like an email
> > message (e.g.  headers followed by a blank line), but changing it would
> > be wrong.
> >
> 
> Here we're just changing "From  foo" into "X-Envelope-From: foo",
> so no information is lost, unless you consider being an mbox file
> information.

That one small change is probably defensible - though I would probably
prefer that such messages were either completely rejected or completely
supported.

Your broader discussion in the sequence of emails seemed to suggest you
were considering a lot more than that - sorry if I misunderstood.

> 
> > Why do you think it might be helpful?
> 
> Currently we throw an error from notmuch-insert when trying to index
> those mbox files (as passed to notmuch-insert by postfix). This means
> the message is either bounced or (with --keep), invisible in the notmuch
> index.

If notmuch-insert is given an 'mbox', shouldn't it either reject it, or
split it up into individual messages and insert each one individually
(discarding the "From" line because it shouldn't add any new
information)?

I don't suppose there is some config option to postfix to tell it to
provide an RFC-2822 email message, not an mbox ???

Thanks,
NeilBrown

  reply	other threads:[~2022-02-15 12:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12  2:55 WIP: filter out envelope headers in notmuch-insert David Bremner
2022-02-12  2:55 ` [RFC PATCH 1/3] test: start new corpus of test messages for indexing code David Bremner
2022-02-12  2:55 ` [RFC PATCH 2/3] test: add known broken test for insert with mbox as input David Bremner
2022-02-12  2:55 ` [RFC PATCH 3/3] WIP: escape envelope from David Bremner
2022-02-12 11:34 ` WIP: filter out envelope headers in notmuch-insert David Bremner
2022-02-13 14:06   ` David Bremner
     [not found] ` <164481580222.17471.7090984749734305531@noble.neil.brown.name>
2022-02-14 11:16   ` David Bremner
2022-02-14 22:23     ` NeilBrown [this message]
2022-02-14 23:52       ` David Bremner
2022-02-15  1:13         ` NeilBrown
2022-02-15  2:15           ` David Bremner

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=164487743989.17471.15302582357377741383@noble.neil.brown.name \
    --to=neilb@suse.de \
    --cc=david@tethera.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).