From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id X/TLNehikmNiFwEAbAwnHQ (envelope-from ) for ; Thu, 08 Dec 2022 23:19:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IKvrNOhikmMjTwEA9RJhRA (envelope-from ) for ; Thu, 08 Dec 2022 23:19:20 +0100 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 4F6D733F39 for ; Thu, 8 Dec 2022 23:19:20 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 244315F3CE; Thu, 8 Dec 2022 22:19:17 +0000 (UTC) X-Greylist: delayed 1004 seconds by postgrey-1.36 at yantan; Thu, 08 Dec 2022 22:19:14 UTC Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [IPv6:2001:4b98:dc4:8::240]) by mail.notmuchmail.org (Postfix) with ESMTPS id AA20C5DD5B for ; Thu, 8 Dec 2022 22:19:14 +0000 (UTC) Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 43110D2823 for ; Thu, 8 Dec 2022 22:02:31 +0000 (UTC) Received: (Authenticated sender: manu@beffara.org) by mail.gandi.net (Postfix) with ESMTPSA id 4597640005 for ; Thu, 8 Dec 2022 22:02:29 +0000 (UTC) Date: Thu, 8 Dec 2022 23:02:26 +0100 Message-ID: <20221208230226.GJ2433@beffara.org> From: Emmanuel Beffara To: notmuch@notmuchmail.org Subject: bug: subject line with several chunks of base64 References: MIME-Version: 1.0 Content-Disposition: inline Message-ID-Hash: 55LADEL6S7E5QQCSO5OCVQGDMIMVT7TF X-Message-ID-Hash: 55LADEL6S7E5QQCSO5OCVQGDMIMVT7TF X-MailFrom: manu@beffara.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; 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: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670537960; 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: references:references:list-id:list-help:list-owner:list-unsubscribe: list-subscribe:list-post; bh=aqIPb/iz78LW4XaXjP3ddQOOXYezgUzpDNNk2xO/U0Q=; b=L9Aun/YwWKItB3i8kF2C6yxIi99QE1J/YpZSm2Hebak+4U7qo/772UPo/SdDtlTHHDqCan sJEx0ecO6THbklGhjmDe8ZK3zsmu1YVZnASF0ACGBMrnqS4dbGKCWkAWx72EKPkOpCojVs Ym+aq9omFe4y5/UdCVLk4PvdtpR8un5XEMCvoE9KsQCUsiM3nNLhZrpefAFJM+bTRGlSaN C88Sgfx/TA6yuvt9EXyy7mM+Q582TRpdbNuo42WNeTofJmvEWajpYPo2vAgh0UoigZVAMV UDKzQbXajVOWebTd7pNu9MiDBrEOrz63Lc+fK1q5hr24wU+60tYJ6JcI2PiMLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670537960; a=rsa-sha256; cv=none; b=h18hSm1lOffasFpUUV2RG1euYR44WYz5SpFfe4Sc+doSVhI2OVyKWH+77wjMSWsTuScvn9 27tv688FMpKOuUuQ2jXWlfZZvJoijOPQQEo2H7rlGvLn0XZkv44h57uiQ4PU/KJZ6W0YPQ NNn2OQV81VF9pM78BWsOeu1RQ/2M9AGRQYg27HN6U983sUk3uV16RXZyvQkaO/mTcJu/0M v7GY2MajxTTuZsOzN1Q25YZfjJ+mv0d/q05fvFLi33KBxeGR/S0IAtquOT4fe8C1qV9qh1 VAIJQazQ6CgsR7ltsLZ0GLWqNL2LIb0mry058EBbr/Uq819ukdegblbOTKsvwA== 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 X-Migadu-Spam-Score: -1.52 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-Migadu-Queue-Id: 4F6D733F39 X-Spam-Score: -1.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7YiuGY+wY3O4 Hello, I am stumbling upon what looks to be a bug. Sometimes I receive messages where a header entry consists of several chunks of base64-encoded quoted utf-8 text. For instance: Subject: =?UTF-8?B?dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZm9yIGRlbW9uc3RyYXRpb24gcHVycA==?= =?UTF-8?B?b3Nlcw==?= For such input, `notmuch search` and `notmuch show` (whatever the output format) consider only the first block as part of the subject, the second block is ignored. Apparently, this happens when the first block is padded with = signs as in my example, not when the base64 encoded part is full. Note that other MUAs treat this header by concatenating the blocks and ignoring the two spaces between them. At least, mutt does that (as well as neomutt accessing the message through notmuch) and so do the webmails I could test with. This should be fixed, because truncating header lines is certainly an important problem. -- Emmanuel