From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: WIP: filter out envelope headers in notmuch-insert.
Date: Sat, 12 Feb 2022 07:34:43 -0400 [thread overview]
Message-ID: <87h794xqr0.fsf@tethera.net> (raw)
In-Reply-To: <20220212025503.1690413-1-david@tethera.net>
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.
On the other hand RFC5321 §4.4 says
When the delivery SMTP server makes the "final delivery" of a
message, it inserts a return-path line at the beginning of the mail
data. This use of return-path is required; mail systems MUST support
it. The return-path line preserves the information in the <reverse-
path> from the MAIL command. Here, final delivery means the message
has left the SMTP environment. Normally, this would mean it had been
delivered to the destination user or an associated mail drop, but in
some cases it may be further processed and transmitted by another
mail system.
At least postfix seems to follow the latter, but also includes the
envelope header when passing a message to a program via .forward.
This seems to imply that if we can trust the MTA to DTRT, the
Return-Path should already be present. OTOH, that is obviously not the
most robust assumption possible.
\r
next prev parent reply other threads:[~2022-02-12 11:35 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 ` David Bremner [this message]
2022-02-13 14:06 ` WIP: filter out envelope headers in notmuch-insert David Bremner
[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=87h794xqr0.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).