--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0BD38431FC4\r
+ for <notmuch@notmuchmail.org>; Sun, 30 Mar 2014 14:22:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id UhbJFXkxd60N for <notmuch@notmuchmail.org>;\r
+ Sun, 30 Mar 2014 14:22:00 -0700 (PDT)\r
+Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com\r
+ [74.125.82.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ C97CC431FBC for <notmuch@notmuchmail.org>; Sun, 30 Mar 2014 14:21:59 -0700\r
+ (PDT)\r
+Received: by mail-wg0-f44.google.com with SMTP id m15so5039419wgh.15\r
+ for <notmuch@notmuchmail.org>; Sun, 30 Mar 2014 14:21:57 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references:in-reply-to:references;\r
+ bh=OuCS9eRmeybqdM6ZNHJ2bkHInjTutM6x/HnMoPs7OlQ=;\r
+ b=TrCc63oPUiTcT0ub4g/L0AuoVAKWQFkckpsl+kr03CJJKyK3Fts7L2nh3kqofJArJV\r
+ NRgwb9j84Cshe1LyfQKyvo6zHGICPkNy4qt/Xw/QEBpYn2fmjlgjRti3m/WOShMAXSc1\r
+ imI9fTP2gpaS29wVZzhsUmf/iNyQ716Jwj7Ar4Va6/OoVaCojxZ2XZZ3Uul4OJ9pWRdQ\r
+ dt3SgVFph3NlI0biQhXftckaNGGsn9j7U/vbP0FhlneaHtQJCjrrHv/nqfdEmzL+YgLV\r
+ c5ePyz+r3UfmOCD/zvuBIHPcOcenA31L+5wB/RBUeSl50g6fiJRqtdUGlybgRAURnaAX\r
+ HhmQ==\r
+X-Gm-Message-State:\r
+ ALoCoQmCQwvKAF7HwzgdvLiB4dDG8fhKAX9j7/Edj+SsNcwE9muMOpvV6yKZchYPAVJJjaN8A7gC\r
+X-Received: by 10.194.48.100 with SMTP id k4mr728248wjn.49.1396214515840;\r
+ Sun, 30 Mar 2014 14:21:55 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id p8sm28327681eef.26.2014.03.30.14.21.54\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sun, 30 Mar 2014 14:21:55 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v5 1/2] lib: drop support for single-message mbox files\r
+Date: Mon, 31 Mar 2014 00:21:48 +0300\r
+Message-Id:\r
+ <657fe62a36d8f6a0b8464f191c2adc95d00de183.1396214154.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.9.0\r
+In-Reply-To: <cover.1396214154.git.jani@nikula.org>\r
+References: <cover.1396214154.git.jani@nikula.org>\r
+In-Reply-To: <cover.1396214154.git.jani@nikula.org>\r
+References: <cover.1396214154.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 30 Mar 2014 21:22:07 -0000\r
+\r
+We've supported mbox files containing a single message for historical\r
+reasons, but the support has been deprecated, with a warning message\r
+while indexing, since Notmuch 0.15. Finally drop the support, and\r
+consider all mbox files non-email.\r
+---\r
+ lib/index.cc | 28 +++++-----------------------\r
+ test/T050-new.sh | 26 ++++++++++----------------\r
+ 2 files changed, 15 insertions(+), 39 deletions(-)\r
+\r
+diff --git a/lib/index.cc b/lib/index.cc\r
+index 78c18cf36d10..2100cce04780 100644\r
+--- a/lib/index.cc\r
++++ b/lib/index.cc\r
+@@ -436,8 +436,6 @@ _notmuch_message_index_file (notmuch_message_t *message,\r
+ notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;\r
+ static int initialized = 0;\r
+ char from_buf[5];\r
+- bool is_mbox = false;\r
+- static bool mbox_warning = false;\r
+ \r
+ if (! initialized) {\r
+ g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
+@@ -453,36 +451,20 @@ _notmuch_message_index_file (notmuch_message_t *message,\r
+ \r
+ /* Is this mbox? */\r
+ if (fread (from_buf, sizeof (from_buf), 1, file) == 1 &&\r
+- strncmp (from_buf, "From ", 5) == 0)\r
+- is_mbox = true;\r
++ strncmp (from_buf, "From ", 5) == 0) {\r
++ ret = NOTMUCH_STATUS_FILE_NOT_EMAIL;\r
++ goto DONE;\r
++ }\r
+ rewind (file);\r
+ \r
+ /* Evil GMime steals my FILE* here so I won't fclose it. */\r
+ stream = g_mime_stream_file_new (file);\r
+ \r
+ parser = g_mime_parser_new_with_stream (stream);\r
+- g_mime_parser_set_scan_from (parser, is_mbox);\r
++ g_mime_parser_set_scan_from (parser, FALSE);\r
+ \r
+ mime_message = g_mime_parser_construct_message (parser);\r
+ \r
+- if (is_mbox) {\r
+- if (!g_mime_parser_eos (parser)) {\r
+- /* This is a multi-message mbox. */\r
+- ret = NOTMUCH_STATUS_FILE_NOT_EMAIL;\r
+- goto DONE;\r
+- }\r
+- /* For historical reasons, we support single-message mboxes,\r
+- * but this behavior is likely to change in the future, so\r
+- * warn. */\r
+- if (!mbox_warning) {\r
+- mbox_warning = true;\r
+- fprintf (stderr, "\\r
+-Warning: %s is an mbox containing a single message,\n\\r
+-likely caused by misconfigured mail delivery. Support for single-message\n\\r
+-mboxes is deprecated and may be removed in the future.\n", filename);\r
+- }\r
+- }\r
+-\r
+ from = g_mime_message_get_sender (mime_message);\r
+ \r
+ addresses = internet_address_list_parse_string (from);\r
+diff --git a/test/T050-new.sh b/test/T050-new.sh\r
+index ad46ee6d51b6..3c3195428223 100755\r
+--- a/test/T050-new.sh\r
++++ b/test/T050-new.sh\r
+@@ -163,22 +163,6 @@ rm -rf "${MAIL_DIR}"/two\r
+ output=$(NOTMUCH_NEW)\r
+ test_expect_equal "$output" "No new mail. Removed 3 messages."\r
+ \r
+-test_begin_subtest "Support single-message mbox (deprecated)"\r
+-cat > "${MAIL_DIR}"/mbox_file1 <<EOF\r
+-From test_suite@notmuchmail.org Fri Jan 5 15:43:57 2001\r
+-From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+-To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+-Subject: Test mbox message 1\r
+-\r
+-Body.\r
+-EOF\r
+-output=$(NOTMUCH_NEW 2>&1)\r
+-test_expect_equal "$output" \\r
+-"Warning: ${MAIL_DIR}/mbox_file1 is an mbox containing a single message,\r
+-likely caused by misconfigured mail delivery. Support for single-message\r
+-mboxes is deprecated and may be removed in the future.\r
+-Added 1 new message to the database."\r
+-\r
+ # This test requires that notmuch new has been run at least once.\r
+ test_begin_subtest "Skip and report non-mail files"\r
+ generate_message\r
+@@ -200,14 +184,24 @@ Subject: Test mbox message 2\r
+ \r
+ Body 2.\r
+ EOF\r
++cat > "${MAIL_DIR}"/mbox_file1 <<EOF\r
++From test_suite@notmuchmail.org Fri Jan 5 15:43:57 2001\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Test mbox message 1\r
++\r
++Body.\r
++EOF\r
+ output=$(NOTMUCH_NEW 2>&1)\r
+ test_expect_equal "$output" \\r
+ "Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config\r
+ Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file\r
+ Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file\r
+ Note: Ignoring non-mail file: ${MAIL_DIR}/mbox_file\r
++Note: Ignoring non-mail file: ${MAIL_DIR}/mbox_file1\r
+ Added 1 new message to the database."\r
+ rm "${MAIL_DIR}"/mbox_file\r
++rm "${MAIL_DIR}"/mbox_file1\r
+ \r
+ test_begin_subtest "Ignore files and directories specified in new.ignore"\r
+ generate_message\r
+-- \r
+1.9.0\r
+\r