From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YNFCDvusCmEIeAEAgWs5BA (envelope-from ) for ; Wed, 04 Aug 2021 17:06:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QKfXCfusCmFaWgAAbx9fmQ (envelope-from ) for ; Wed, 04 Aug 2021 15:06:35 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 E7804F8FB for ; Wed, 4 Aug 2021 17:06:33 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 39F742919E; Wed, 4 Aug 2021 11:06:30 -0400 (EDT) X-Greylist: delayed 586 seconds by postgrey-1.36 at nmbug; Wed, 04 Aug 2021 11:06:27 EDT Received: from fossa.birch.relay.mailchannels.net (fossa.birch.relay.mailchannels.net [23.83.209.62]) by mail.notmuchmail.org (Postfix) with ESMTPS id 4D37429194 for ; Wed, 4 Aug 2021 11:06:27 -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 EC6601E15BE for ; Wed, 4 Aug 2021 14:56:38 +0000 (UTC) Received: from pdx1-sub0-mail-a70.g.dreamhost.com (100-96-16-104.trex-nlb.outbound.svc.cluster.local [100.96.16.104]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8922A1E1919 for ; Wed, 4 Aug 2021 14:56:38 +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.16.104 (trex/6.3.3); Wed, 04 Aug 2021 14:56:38 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|mailer@picnicpark.org X-MailChannels-Auth-Id: dreamhost X-Irritate-Quick: 7cc020625c6284a0_1628088998796_3778959900 X-MC-Loop-Signature: 1628088998796:639155525 X-MC-Ingress-Time: 1628088998796 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 3C98C8868D for ; Wed, 4 Aug 2021 07:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=picnicpark.org; h=to:from :subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=picnicpark.org; bh=dXUHv0dHhbHcdHe fvcvu3Xe8Jpg=; b=mXajD1N9I8OOAPsecVBedJOcTBqH50h6Xl2j+sjG2gfpm2m h0bSmbY2bVTvPXZnyOo4+y7I4Tf6dR04OzP8DcjqQhu/wkRg/KlbjDVMR3S9+wwn 0JCR4TI1m6998qGlcj/biWfSh9aGmNzilYQlUHYAMkWmMk1I1gNq7t7Aup/Y= 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 28E4487C78 for ; Wed, 4 Aug 2021 07:56:38 -0700 (PDT) Received: from [192.168.35.1] (ithil-1Gbps.picnicpark.org [192.168.35.1]) by imladris.picnicpark.org (Postfix) with ESMTPSA id 34A8CBC1832 for ; Wed, 4 Aug 2021 07:56:37 -0700 (PDT) To: notmuch@notmuchmail.org X-DH-BACKEND: pdx1-sub0-mail-a70 From: Keith Amidon Subject: Multiple header sources for an index.header query prefix? Message-ID: Date: Wed, 4 Aug 2021 07:56:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 Content-Language: en-US Message-ID-Hash: UBXD6VB5DZMHACMFFZYM5R2TU7HGDJFL X-Message-ID-Hash: UBXD6VB5DZMHACMFFZYM5R2TU7HGDJFL 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=1628089594; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vIk4l3cEUGckXW0ehjNbtr5efdtb364LCVxgSIXVF3E=; b=oby3QNO74POmMvnAp2k3C/nE/+6bRUlpyHWtgV6a0cbS6rIpdcE01Kn/lnEskBAx1d5ZUQ HJz3beMcNwvWXrp+m2rFEM6B9S/FilFQsX9sjkLe84JZv/14wkq8KTLaSHng+jZY3+yQrB Qv+XnhjdwSsirI4HN55FhW1/r1MYBG8nP42GpXnCw07z6jgrCpmWUC13sqDfiGlHc8HUH3 gfNyri03TQJaH3Up0vu/iyUBU4iBaVHqFHz+WGGQCqXozzDEDVojqsctjq40bsOULBZMPi 9yS0Nl4jcAFLv0/KFR/iGI/NcTZdsZJWbkuaZ7ql9MXeXmPkG74D77gaevUQnw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628089594; a=rsa-sha256; cv=none; b=asvkySLfSQ4Ib3hXJ7iDNEtb/7POiv3tjPP48CsiAWNXEdUYVKPdErU3jmKw2W4npt6Z7Q m4BYsD/O5HWFAPSGnapr6h1Xvsln/ZloDSAcRtkB/RvI91A+ZmiokWrGWB6fuYD3bkzQ4g ZOi+l0JqJZ7UUWI42In0x9j9YhV5XrVNUExUJSOvWztOPaLMFUIkZktyA312rvaAYQvV3H ILGllsF8iNJvxMG8imULZGrb8OXmXpfEgwMw/rzQMWDUcfleU+7LnmOwFi6A+VdAfG5L0C YlCXkna8azSund2r2pV0e/ddTCYtneQUSar2MD+E1cjcyL1Lztqwt9SK+aofcA== 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=mXajD1N9; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=picnicpark.org header.s=picnicpark.org header.b=mXajD1N9; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E7804F8FB X-Spam-Score: -0.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: MpdsD7WXmbUB I've been a very happy user of notmuch for a very long time. Thank you for such a great tool! Recently I've been working on implementing a new workflow for handling email which uses automated tagging much more heavily. In doing so, I want to use some custom header indexes to construct some of the searches and it seems like it would be very convenient to be able to index multiple custom headers under the same query prefix. For example, I'd like to be able to index both X-spam and X-Spam-Result under the query prefix "Spam:". I tried just adding two custom header lines to the config file with the same query prefix, like: [index] header.Spam=X-Spam header.Spam=X-Spam-Result It appeared that after reindexing, notmuch just used the final line with the same query prefix. In addition, the python bindings config parser fails on such a configuration with an error that the header value is already in use. Checking the code, it this behavior seems consistent. 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? 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? Thanks for your help! Regards, Keith