unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Edward Betts <edward@4angle.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Don't bother checking for mbox files
Date: Sun, 13 Mar 2016 14:48:41 +0200	[thread overview]
Message-ID: <87mvq2pmqe.fsf@nikula.org> (raw)
In-Reply-To: <20160313105742.GA9173@4angle.com>

On Sun, 13 Mar 2016, Edward Betts <edward@4angle.com> wrote:
> Keith Packard <keithp@keithp.com> wrote:
>> Postfix adds mbox-style From lines when used in combination with
>> maildrop or .forward files. If they have another line starting with
>> 'From ' in them, notmuch complains about them not being mail files.
>> 
>> If we assume the user hasn't screwed up and misconfigured their mail
>> system, then we can safely ignore whether the file started with an
>> mbox header and just parse it as a single-message file.
>
> I think it is fine to go ahead with this change. At the same time the
> behaviour of Postfix should be corrected so it doesn't add mbox-style From
> lines to mails in maildir format.

I disagree with making the change (as-is, at least).

In general, Notmuch does not support mboxes. We expect maildir style one
message per file mail storage. We support single-message mboxes as a
special case, in part because, as you note, there's plenty of other
software that adds the mbox "From " line even though delivering to
maildir.

I think it's misleading and confusing to the users to accept and index
the first message of mboxes, and silently ignore the rest (or worse,
index all of the mbox and associate the text with the first message). I
think we should reject multi-message mboxes, because we have no code to
handle them. This patch throws away that check.

Now, IIUC, the problem here is not that the files actually are
multi-message mboxes. We could use a sample message (even a crafted one)
that exhibits the problem, so we could add a test case, and fix Notmuch
to deal with it gracefully (if we decide catering to potentially broken
other software is the way to go), while retaining the code to reject
multi-message mboxes. With the test case, we'd also avoid accidentally
breaking this in the future.

BR,
Jani.

  reply	other threads:[~2016-03-13 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10  0:08 [PATCH] Don't bother checking for mbox files Keith Packard
2016-03-13 10:57 ` Edward Betts
2016-03-13 12:48   ` Jani Nikula [this message]
2016-03-14  7:23     ` Tomi Ollila

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=87mvq2pmqe.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=edward@4angle.com \
    --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).