From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GJAQFXrAQ2RHsQAASxT56A (envelope-from ) for ; Sat, 22 Apr 2023 13:09:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GOzdE3rAQ2QYBwAAG6o9tA (envelope-from ) for ; Sat, 22 Apr 2023 13:09:46 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 166104D89 for ; Sat, 22 Apr 2023 13:09:45 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2C1915F822; Sat, 22 Apr 2023 11:09:42 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id D80595F818 for ; Sat, 22 Apr 2023 11:09:39 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id A14395FB95; Sat, 22 Apr 2023 07:09:38 -0400 (EDT) Received: (nullmailer pid 150462 invoked by uid 1000); Sat, 22 Apr 2023 11:09:37 -0000 From: David Bremner To: Al Haji-Ali , notmuch@notmuchmail.org Subject: Re: Correcting message references In-Reply-To: References: Date: Sat, 22 Apr 2023 08:09:37 -0300 Message-ID: <874jp85g26.fsf@minkowski.home> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Message-ID-Hash: X7G6DAG3ATGTDPX5QQUFBNYURL7PQKKU X-Message-ID-Hash: X7G6DAG3ATGTDPX5QQUFBNYURL7PQKKU X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682161785; a=rsa-sha256; cv=none; b=jWwyvZPkIzx0dLpF8L876EqasKB6zG6PPaZDTc5AZ7a+pb2eg5MDFRspt5la5K3ED4/6o+ zmQ+m1FE4YjeJJr5EoUg2k6hIP+YHeTSC9Yh/fYWNaypK1ERndPgPlijloJUwH2N2Fgp4j m2uOauUvDKBNa0dGBrD0CSyzUHEmUgDejOPd7JMhYyP17ogVhaUDfxhd8AOon3Z3309kQl Twt5CGv+eRs6xBSwyVrj6ed1K6ytTQI/Zy5nnNEYoE5XjTI1/tLZdY1h3099hFE86KUBSD 6gyCWTglC/UFWDZnpaF4NXlj7PUGL44+smHlKpFIKuZYqFz3julX3qb5TK2mEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682161785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=4D1X8kUSmnxy21jwsBFjncdNZy5lz38n+ezLmVEL0og=; b=dXiNSFNJu7kVCrTy4E1FgEK/6ECSkkqu1PdQDsfFpuz5u1X3v66jqg9IccLLr2sbi7mJf7 CXBAamzojxGg5Tijog3S3r/KOEhbFaDtE+8wmvpgfl3pbRGbjJMBywlfEEOfyn5q23Dbd7 XJ71bkXnI1sliOASNSoK7rLVLnqXEEesz4JPy7co0ig4vg48gNBNpvjt2/mRvYOvwlWage 1o+Pig+TeyjRwicmuBfw/4UuNJLK+3on0BF7t07KLcOv5CxqDCUTIT89Rz/aE3tsk3R88r Zk0nWVovb0s5FzVc3hcxsT6LjJs7DOXzRrdQxxmlWAyGdBRqCnCpQm2fG77cHQ== X-Migadu-Spam-Score: -2.24 X-Spam-Score: -2.24 X-Migadu-Queue-Id: 166104D89 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-TUID: szWeOBYs0oKC --=-=-= Content-Type: text/plain Al Haji-Ali writes: > I changed the message, removed "B" from "References" and deleted the > files of all old (and intermediate) drafts that have "B" in > "References". But no matter what I do, I have "B" grouped with "D" > and any other messages which I create with "In-Reply-To" being "A". How did you find the files to delete? One trap to watch out for is that if using notmuch, you should use notmuch search --exlude=false, to make sure messages are not being hidden because of their tags. > I suspect that somewhere in the database the IDs of "A" and "B" are > linked now. Is there a way (short of deleting the database and > re-indexing) to correct this and remove this connection? The database does not store relationships explicitely, only via messages with references to other messages. At a high level you can try the attached script to get a picture of the corresponding thread. If you can't run the script, or it doesn't help, you can interrogate the database directly without going through notmuch. if the message-id of B is 'foo@example.org' you can search with for replies with xapian-delve (in xapian-tools on Debian and derivatives). xapian-delve -d .local/share/notmuch/default/xapian \ -t 'XREPLYTOfoo@example.org' and for references xapian-delve -d .local/share/notmuch/default/xapian \ -t 'XREFERENCEfoo@example.org' That will give you Xapian record numbers, and you can turn those into files with something like xapian-delve -d .local/share/notmuch/default/xapian -r 801793 -1 | \ perl -ne 's/XF(D|O).*?:// && print' For records with multiple files, you will have to figure out with file goes with which directory (or just find the file names, which supposed ot be unique). --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=draw-thread Content-Transfer-Encoding: base64 IyEvYmluL2Jhc2gKCiMgVGhpcyBzY3JpcHQgY2FuIGJlIHVzZWQgbGlrZQojIE5PVE1VQ0hfQ09O RklHPXRlc3QvdG1wLlQ1ODAtdGhyZWFkLXNlYXJjaC9ub3RtdWNoLWNvbmZpZyBcCiMgICAgZGV2 ZWwvZHJhdy10aHJlYWQgdGhyZWFkOjAwMDAwMDAwMDAwMDAwMDIgfCBkb3QgLVRwZGYgPiB0aHJl YWQyLnBkZgoKIyBJbiBhZGRpdGlvbiB0byBub3RtdWNoLCB5b3Ugd2lsbCBuZWVkIHRoZSBmb2xs b3dpbmcgdG9vbHMgaW5zdGFsbGVkCiMgLSBncmFwaHZpegojIC0gbWJsYXplIChvciByZXBsYWNl IHRoZSBjYWxsIHRvIG1oZHIpCgp0aHJlYWRpZD0kMQoKZGVjbGFyZSAtYSBlZGdlcwoKZGVjbGFy ZSAtYSBkZXN0CmVjaG8gImRpZ3JhcGggXCIkdGhyZWFkaWRcIiB7Igpmb3IgbWVzc2FnZWlkIGlu ICQobm90bXVjaCBzZWFyY2ggLS1leGNsdWRlPWZhbHNlIC0tb3V0cHV0PW1lc3NhZ2VzICR0aHJl YWRpZCk7IGRvCiAgICBlY2hvICJzdWJncmFwaCBcImNsdXN0ZXJfJG1lc3NhZ2VpZFwiIHsiCiAg ICBwcmludGYgIlwiJXNcIiBbc2hhcGU9Zm9sZGVyXTtcbiIgJHttZXNzYWdlaWQjaWQ6fQogICAg Zm9yIGZpbGUgaW4gJChub3RtdWNoIHNlYXJjaCAtLWV4Y2x1ZGU9ZmFsc2UgLS1vdXRwdXQ9Zmls ZXMgJG1lc3NhZ2VpZCk7IGRvCiAgICAgICAgbm9kZT0kKGJhc2VuYW1lICRmaWxlKQogICAgICAg IHByaW50ZiAiXCIlc1wiIFtzaGFwZT1ub3RlXTtcbiIgJG5vZGUKCiAgICAgICAgbWFwZmlsZSAt dCBkZXN0IDwgPChtaGRyIC1oUmVmZXJlbmNlcyAkZmlsZSB8IHRyICc8PiwnICciIiAnKQogICAg ICAgIGVkZ2U9IlwiJG5vZGVcIiAtPiB7ICR7ZGVzdFsqXX0gfSIKICAgICAgICBlZGdlcys9KCRl ZGdlKQogICAgZG9uZQogICAgZWNobyAifSIKZG9uZQoKZm9yIGVkZ2UgaW4gIiR7ZWRnZXNbKl19 IjsgZG8KICAgIGVjaG8gJGVkZ2UKZG9uZQoKZWNobyAifSIK --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --=-=-=--