From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gG36FzF22WBBDgEAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 09:11:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kJ3SEzF22WDmQQAA1q6Kng (envelope-from ) for ; Mon, 28 Jun 2021 07:11:45 +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 165E323119 for ; Mon, 28 Jun 2021 09:11:45 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C82CA290C6; Mon, 28 Jun 2021 03:11:38 -0400 (EDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mail.notmuchmail.org (Postfix) with ESMTPS id 82AD12908E for ; Mon, 28 Jun 2021 03:11:35 -0400 (EDT) Received: by mail-lj1-f175.google.com with SMTP id c11so24105324ljd.6 for ; Mon, 28 Jun 2021 00:11:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:in-reply-to :references; bh=FJmTToHmvva1AR61irWDK+LWFrCqKLMwKc8uaehFsgA=; b=qqTWEYXwVWbvlRGqeit2Dlky2TRDtaaSd9jUA+QQaGBVC+YNixhofjuBXw4opj27vS ynS4Nbf22tZUnOU+T7JQWieANNYoceHLRVs8zq2Hz19UtmhB6+6afI9k6IRNeWsxjvpI mRXfsKqfleMOZhI0qTD+haKD4IYSj1lUjmgGvY3Zom0cZlruK7VkRfX4wmsMgjGJxzS3 6rKvoyRep/NA4VZXIdAgiaLQGSbcxDuGe5lXP77HTIHLahwfedNw/DAP+qZik8WdiWJF fsK/q2j/3kMRpNp1xgINFPk3LQjU76qln0cbllG6+b/el80kO9cRmDCeEcT5gZBSVvGG b9sA== X-Gm-Message-State: AOAM533xyZnEl2Ynm6Q5m2nPbE3mNX2HXOe2JtxgRRkPqKMS9ebhbFZ6 8Wg06ka8gU8+T7DvgyJPg9c= X-Google-Smtp-Source: ABdhPJy4RSOak2+SZDDo9T5CmHe7vqhbzoln6VJLhxG6n3mg7RVataFXdx+aqTtLdAdBlF2D9ASUyg== X-Received: by 2002:a05:651c:112b:: with SMTP id e11mr18581411ljo.39.1624864294055; Mon, 28 Jun 2021 00:11:34 -0700 (PDT) Received: from localhost (88-112-11-80.elisa-laajakaista.fi. [88.112.11.80]) by smtp.gmail.com with ESMTPSA id u19sm1231439lff.237.2021.06.28.00.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 00:11:33 -0700 (PDT) Message-ID: <60d97625.1c69fb81.bb41d.6abc@mx.google.com> Date: Mon, 28 Jun 2021 10:11:32 +0300 From: Hannu Hartikainen Subject: Re: [PATCH] lib: consider all instances of Delivered-To header To: David Bremner , notmuch@notmuchmail.org In-Reply-To: <874kdkzfxk.fsf@tethera.net> References: <20210623102906.20602-1-hannu@hrtk.in> <874kdkzfxk.fsf@tethera.net> Message-ID-Hash: ICJIHGCAWWHDZV3LMJOVGVMF2ZDJLLO6 X-Message-ID-Hash: ICJIHGCAWWHDZV3LMJOVGVMF2ZDJLLO6 X-MailFrom: hannu.hartikainen@gmail.com 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: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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=1624864305; 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; bh=8n3PybDATBahiGavH3Xh6Hou3ZvmVuYrZ647wT1cuvo=; b=gsRwM6nTFKC4ByANjglAgLc0IN2nupowqawnVfK2LHLyPrb6AOucCmaz6GaWtfIf4wopH3 ShRzjwprbltYPaMMPTFi1PW1TVgyzJw/ZHhri5tf6LbZWRNlIkfgWOtLGolbQ3Ck2n/Pqf 2TbDnQAieP+QQdHIW7Gt22o3Z3ynbep6v2j4wzHsng6Wt9OzZ+n1XAEN6SzZBIbZ+qm5fi i6bo1nNUb0bCiJrxUxchvj6od1ZxzecPcP4Dz4IZkcIL7oDz7whyipi3GocrSJFtak7qhN 5p0ivk7r6rLimms1yACe4S5ZLvivCbkYK7qvDlxLr5wHIdnu9qLNv7x0QLCtUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624864305; a=rsa-sha256; cv=none; b=ST221pWuhghuW8Y+XF4I+C/Y3V+tY4JCepm6nHxLeOvYcgke/iRMLmzS/YPmX8BY0ZTQsF QdXoLQwyyHjbf8C4VWyWDaRGdMg2p2um7lQXh/EC8E5WiHpXaaZFtCq8RhIvSAfGFz9DrT 2lf8ykYhzeNLPS7nuwoDyvjvdwnM5X1sLhB0lLmWtirXAxaapCOQBwGpqJrGSnYZFtCGba HeZ25cTH11v9ka5eg25oGoyWe3Wn9n/deYEUVyvWyCj14imqcjSec0Ghot33cmhkQbnNDe CLulAYkSl/m08Luqzfa3GOJxTtyO8vMzsZWMPAiJlZtuLajDzl95dhZG7Fhlag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 165E323119 X-Spam-Score: -2.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: EjzwdKWLHQ4O Thanks for the review! Please consider the patch obsolete, I'll submit a v2 later with the comments addressed. On Sat, 26 Jun 2021 14:36:23 -0300, David Bremner wrote: > Hannu Hartikainen writes: > > + * Similarly, multiple instances of Delivered-To may be present. We > > + * concatenate them so the one with highest priority may be picked. > > */ > > Highest priority seems a bit vague here. Do you mean most recent? I mean that the address configured as `primary_email` is chosen over those configured as `other_email` if both are present. Basically, let `user_address_in_string` in notmuch-reply.c do its thing. AFAICT the addresses in `other_email` are checked in sequence so the first matching one is chosen, ie. they also have a priority. Not sure if that is intended and documented or if it could change later, so I didn't want to go into specifics in the comment. > The idiomatic (for notmuch) thing to do for a bug fix is first to add a > test with "test_subtest_known_broken", then to remove that line in the > commit you fix the bug. So it's best to have a commit with only the (broken) test first as opposed to adding the fix and the test in the same commit? Ok, I'll do that. Hannu