From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: Duplicate message ids
Date: Sun, 27 Aug 2017 10:45:10 +0100 [thread overview]
Message-ID: <87378dny3d.fsf@qmul.ac.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Hi
A concern for notmuch is some form of attack via someone sending a
message with a duplicate message id. I think I have seen it asserted
that it is not so much of a problem as the first message received by
notmuch will have priority.
However, I believe that this is not the case. The script below gives a
demonstration (on my system at least). I have written it as a "test" so
(I hope) it doesn't mess up the system. It should work if you put it in
the test directory and execute it.
It adds a message, runs notmuch new, adds a message with the same id,
runs notmuch new, and then runs notmuch search <id> and notmuch show
<id>. The former shows the subject of the first message, and the latter
the subject of the second message.
Best wishes
Mark
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: T710-duplicate-id.sh --]
[-- Type: text/x-sh, Size: 602 bytes --]
#!/usr/bin/env bash
test_description='Do duplicate message ids get shown in arrival order'
. ./test-lib.sh || exit 1
find ${MAIL_DIR}
generate_message [id]=duplicate-id [subject]=first [body]=first
mkdir "${MAIL_DIR}"/b
mv "$gen_msg_filename" "${MAIL_DIR}"/b
notmuch new
generate_message [id]=duplicate-id [subject]=second [body]=second
mv "$gen_msg_filename" "${MAIL_DIR}"/a
notmuch new
find ${MAIL_DIR}
echo
echo SEARCH: observe \"first\" is the subject
notmuch search id:duplicate-id
echo
echo SHOW: observe \"second\" is the subject and body
notmuch show --format=json id:duplicate-id |json_pp
next reply other threads:[~2017-08-27 9:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-27 9:45 Mark Walters [this message]
2017-08-27 13:19 ` [PATCH] test: check for subject consistency between search and show David Bremner
2017-08-27 18:48 ` [PATCH] test: duplicate mids: add an extra broken search test Mark Walters
2017-08-27 23:58 ` [PATCH 1/5] test: make fallback to duplicate test more robust David Bremner
2017-08-27 23:58 ` [PATCH 2/5] test/duplicate-mid: clarify index order vs filename order David Bremner
2017-08-27 23:58 ` [PATCH 3/5] test: known broken test for subject after reindexing David Bremner
2017-08-27 23:58 ` [PATCH 4/5] lib: enforce that n_message_reindex takes headers from first file David Bremner
2017-08-27 23:58 ` [PATCH 5/5] test/duplicate-mid: check for subject with notmuch-show David Bremner
2017-09-06 1:29 ` [PATCH 1/5] test: make fallback to duplicate test more robust 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=87378dny3d.fsf@qmul.ac.uk \
--to=markwalters1009@gmail.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).