From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SM0sBNJlGWHGswAAgWs5BA (envelope-from ) for ; Sun, 15 Aug 2021 21:06:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aCoZO9FlGWE0dwAAB5/wlQ (envelope-from ) for ; Sun, 15 Aug 2021 19:06:57 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 2118D2F98C for ; Sun, 15 Aug 2021 21:06:57 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D86041FB94; Sun, 15 Aug 2021 15:06:52 -0400 (EDT) X-Greylist: delayed 327 seconds by postgrey-1.36 at nmbug; Sun, 15 Aug 2021 15:06:49 EDT Received: from dormouse.elm.relay.mailchannels.net (dormouse.elm.relay.mailchannels.net [23.83.212.50]) by mail.notmuchmail.org (Postfix) with ESMTPS id 91CAE1FB8A for ; Sun, 15 Aug 2021 15:06:49 -0400 (EDT) X-Sender-Id: dreamhost|x-authsender|mailer@picnicpark.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id ECD807811D6 for ; Sun, 15 Aug 2021 19:01:19 +0000 (UTC) Received: from pdx1-sub0-mail-a70.g.dreamhost.com (100-96-18-119.trex-nlb.outbound.svc.cluster.local [100.96.18.119]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 87F4B78135D for ; Sun, 15 Aug 2021 19:01:19 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|mailer@picnicpark.org Received: from pdx1-sub0-mail-a70.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.18.119 (trex/6.3.3); Sun, 15 Aug 2021 19:01:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|mailer@picnicpark.org X-MailChannels-Auth-Id: dreamhost X-Slimy-Troubled: 4addb53e2a0e2ff0_1629054079770_4052149025 X-MC-Loop-Signature: 1629054079770:2136711601 X-MC-Ingress-Time: 1629054079770 Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id 3076E88191 for ; Sun, 15 Aug 2021 12:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=picnicpark.org; h=subject :to:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=picnicpark.org; bh=A0 eXYzzk6sDu5mhVzxzIzb4nLCM=; b=0BxDEul09PGGX1L9eyeBNBlXphPbrKrNaJ uLK2+awqw9XtwYHFEB8aVOhk8UpK2VO/Nmj/nHbfKdlN4NXIC30LSpAy/m+nf7+m iZULqo5/wbQxJkObUA65TxexXOdue9unK8jnP2vssPEfj7kRg1JkTeFn5jXo5npB wZNdc3C7M= Received: from imladris.picnicpark.org (75-37-193-13.lightspeed.lsatca.sbcglobal.net [75.37.193.13]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mailer@picnicpark.org) by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTPSA id E301785DB2 for ; Sun, 15 Aug 2021 12:01:18 -0700 (PDT) Received: from [192.168.35.1] (ithil-1Gbps.picnicpark.org [192.168.35.1]) by imladris.picnicpark.org (Postfix) with ESMTPSA id BCE9CBC08FF for ; Sun, 15 Aug 2021 12:01:17 -0700 (PDT) Subject: Re: Multiple header sources for an index.header query prefix? To: notmuch@notmuchmail.org References: <87a6lww4qo.fsf@tethera.net> X-DH-BACKEND: pdx1-sub0-mail-a70 From: Keith Amidon Message-ID: <4607c340-60f7-cfa4-2a97-3d13cb6bdb59@picnicpark.org> Date: Sun, 15 Aug 2021 12:01:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87a6lww4qo.fsf@tethera.net> Content-Language: en-US Message-ID-Hash: T5OYMD4MJUHD2HFZPNO6IIS7KFGLLKVO X-Message-ID-Hash: T5OYMD4MJUHD2HFZPNO6IIS7KFGLLKVO X-MailFrom: camalot@picnicpark.org 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629054417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=rS9Wt9F0A0mKPXJPfJgsiTxq99K8Hwa2Uv79R8LiYuU=; b=bT9+0CPqS5LGkcCBWUSbvhkl2Q617rBfj9LYtpxiPN+oGUP3yxcByHJGTQ1H/jvryM9FS1 B1sYcSZEyEnFZfWdfzfaFdK+/xwNCUjxCu9rAOGBC0GvHtLZTqPE8hW2UgrsMjVHNclbD4 zHt+DJI4YlIFRQpAE00QK/8mqCsLspCm6EOVJ8cj1Rlm1qew25beczLZYcShWABhIMG3Eg BWLBxyodYmVZdrzXDyszJoC4adqToUFOaPJbACoo7PRfo1UfnvKQoPpowrRO6PhHukdlKB 9vIANdHVrV9sBVB5NPVc/bLeFoR+Sy7m+KyDWtXbXtV2Hhhb/tM0h+PdhCU4hA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629054417; a=rsa-sha256; cv=none; b=Hjv9F0ofoK8cC5O1ew/n2kVworUa2KQap/wM1abOf3zo43FfM0pKpT9LXn2MSbkaGibwJH 2OaWqtJmC3b9B8yHYGvSyG2UQMcbH7zhWErSIOYnGDiGX2Nqe/sw64lJ8uiewk0El2dzDW YAFuKNwUKS7L97AUzP9OwsZ7sFcvScBAdn0G0zb/c7BKufxj8eHD7euJkFmkhWDUURAYxT VVOGqEA+wtWIEU6VmqmFs9SBdTNnFYKaSaqB2hJiarDVHZIWYxwIgcTb7ZCJRrjrj+MkCb FX4eHDVJRemWBY3p8ciqL2fBYIwBPAyTLL7kX+GsFDZjqodKT6xL71grbiSDIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=picnicpark.org header.s=picnicpark.org header.b=0BxDEul0; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=picnicpark.org header.s=picnicpark.org header.b=0BxDEul0; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 2118D2F98C X-Spam-Score: 0.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: lWCQOi1YJalC On 8/5/21 3:44 AM, David Bremner wrote >> I started thinking about how I would add this feature and was thinking >> it might be better to support in the configuration by using semi-colon >> separated values like some of the other config options. For example: >> >> [index] >> header.Spam=X-Spam;X-Spam-Result >> >> Does this seem a reasonable way to go? Is this an extension of the >> custom header indexing behavior that you would be interested in? > It sounds reasonable. > >> Finally, any suggestions for approaching an implementation? In >> particular, I believe there were some recent changes to also store the >> configuration in the database. Any thoughts on how this suggestion would >> interact with that? > An implementation would need to update > _notmuch_message_index_user_headers to iterate (using > notmuch_config_get_values_string) over the desired headers. Basically > the call to `_notmuch_message_gen_terms` needs to be repeated once for > each header, using the same value for `prefix_name`. > > And of course the tests and notmuch-search-terms(7) would need to be > updated. Thanks for the encouragement and suggestions. The time it has taken me to respond to this thread is a fairly accurate indication of the amount of time I have to work on this right now, but it is something that I'd definitely would find useful so I'll plug away on it when I can make time and update the list when I hopefully get something working. Thanks again, Keith