Re: WIP: filter out envelope headers in notmuch-insert.

Subject: Re: WIP: filter out envelope headers in notmuch-insert.

Date: Tue, 15 Feb 2022 09:23:59 +1100

To: David Bremner

Cc: notmuch@notmuchmail.org

From: NeilBrown


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

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: