unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: WIP: filter out envelope headers in notmuch-insert.
Date: Sun, 13 Feb 2022 10:06:27 -0400	[thread overview]
Message-ID: <87pmnqx3mk.fsf@tethera.net> (raw)
In-Reply-To: <87h794xqr0.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> David Bremner <david@tethera.net> writes:
>
>> I thought about a more ambitious version that would replace any
>> existing "Return-Path" headers, but it seems like significantly more
>> work (the current code is not line based), and not obviously
>> better. Or maybe I missed the wording in the RFCs that talks about how
>> MDAs should behave here.
>
> The RFC wording I _did_ find is as follows.
>
> RFC5598 says that (§4.3.3)
>
>       The MDA records the RFC5321.MailFrom address into the
>       RFC5321.Return-Path field.
>
> where the first is the (address in) envelope from and the second is the
> Return-Path: header. I'm not sure how authoritative RFC5598 really is;
> it is "Category: Informational", whatever that means.

Starting at RFCs some more (as one does), I think that the "envelope
header" added by e.g. postfix's local(8) does not count as a
RFC5321.MailFrom (although it should contain the same
information). These mbox style envelope headers do not seem to super
well defined. RFC 4155, which is _about_ mbox, seems to go out of its
way not to define the syntax.

The following (from RFC5598) seems to indicate that
MDAs speak SMTP.

   Transfer into the MDA is accomplished by a normal MTA transfer
   mechanism.

If correct, that means that notmuch-insert is not an MDA in the sense
meant by RFC5598

As an experiment I converted copy_fd to line oriented form (which I
guess I'll post seperately), but I realized that further progress would
require parsing the "envelope header" line.\r

  reply	other threads:[~2022-02-13 14:06 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 [this message]
     [not found] ` <164481580222.17471.7090984749734305531@noble.neil.brown.name>
2022-02-14 11:16   ` David Bremner
2022-02-14 22:23     ` NeilBrown
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=87pmnqx3mk.fsf@tethera.net \
    --to=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).