From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 126D26DE0352 for ; Sun, 27 Aug 2017 02:45:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.079 X-Spam-Level: X-Spam-Status: No, score=0.079 tagged_above=-999 required=5 tests=[AWL=-0.051, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xFnuVWDW8uHK for ; Sun, 27 Aug 2017 02:45:16 -0700 (PDT) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by arlo.cworth.org (Postfix) with ESMTPS id A757B6DE0350 for ; Sun, 27 Aug 2017 02:45:15 -0700 (PDT) Received: by mail-wm0-f49.google.com with SMTP id b82so8032323wmd.1 for ; Sun, 27 Aug 2017 02:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=iSw2W5sghGFMopOoxuWmC8Jod2rGdh2OU7LaEdhT+aM=; b=aouvKUvHKLDL6caLZ660egdbnqeUMEDJftvMHGPujKV3Pqljk0S5l9GqjkSTm3Iv1o 1rKLnGXL9krRkmKZXr5sa7vO5mSIHoWMvtsCWKVuWCzQKN2cna7bI9k9KlyHTTqj2buE Wm3bIV6Q7q4cd+afBcmqOES8zEsBrlzMeOOq4ivxXBHLMV3S59aSCXO3mOsEYOtS7w7l B7yh00taIdlP8tDLnpPJJmygTMTX0Rhdagh4g9m53zf2oKDrVeTKNlWbUJEOxkbqF1y6 hOsAG6tqLbrNv21OJQRtAksFwn1Nkit4ZeBxGYNP5WqzDT0kwVSZgTodq2zjId0zmTG3 HEzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=iSw2W5sghGFMopOoxuWmC8Jod2rGdh2OU7LaEdhT+aM=; b=iaOyhWEnZuOkuCxVoSMZZ0j6zxEpCgHrGQ9xmlvj9NYvS9Ein4HnY59EdPapS7ToDE 5GpHHks0bdDl1HDKq77rVLilRD0Yapx2YALMCrwm/TR5hO2jV5lFcDDeo3nCFCim2bBy iBvoBjbySI12Bo0wzbY4z3MtDMeps2mr/uaIrh2fJv/SlLt62sD9u8XpgfJu+uHQ3jp8 iKWYGYi4ULjwa2NilMuNGyOOsqtyfBdcBCJwZUykeFpLEPAYuC8kJxlSsG5UkhgGyCf+ A8oreeDkJAKg/07enqSovmlSd7lcqOC9d+llnxC/bc0swepBdUosc9sM0KubOOf3kKz2 +pIg== X-Gm-Message-State: AHYfb5jZvEHDBAoP6NUnMrO5Gn8rlbedlyP4vZJmODHlFvZV/CR1nuNU BYBuUmOmuHJKlcEL X-Received: by 10.28.57.135 with SMTP id g129mr1879662wma.186.1503827113850; Sun, 27 Aug 2017 02:45:13 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id 6sm6407446wrd.20.2017.08.27.02.45.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Aug 2017 02:45:11 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: =?UTF-8?B?RHVwbGljYXRlIG1lc3NhZ2UgaWRzICA=?= Date: Sun, 27 Aug 2017 10:45:10 +0100 Message-ID: <87378dny3d.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Aug 2017 09:45:17 -0000 --=-=-= Content-Type: text/plain 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 and notmuch show . The former shows the subject of the first message, and the latter the subject of the second message. Best wishes Mark --=-=-= Content-Type: text/x-sh Content-Disposition: attachment; filename=T710-duplicate-id.sh #!/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 --=-=-=--