From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SOxLOQOs/V+iKAAA0tVLHw (envelope-from ) for ; Tue, 12 Jan 2021 14:02:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cCQiNQOs/V80bAAAB5/wlQ (envelope-from ) for ; Tue, 12 Jan 2021 14:02:43 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A3E439403A2 for ; Tue, 12 Jan 2021 14:02:42 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7CC1D29E75; Tue, 12 Jan 2021 09:02:36 -0500 (EST) X-Greylist: delayed 167614 seconds by postgrey-1.36 at nmbug; Tue, 12 Jan 2021 09:02:33 EST Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id D2E9E29D63 for ; Tue, 12 Jan 2021 09:02:33 -0500 (EST) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id BA4161B00258; Tue, 12 Jan 2021 16:02:30 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1610460150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q5XV8DtfYUVqpa2NFJdqMdlaOBg79Iwt3QX3FZ6l8xs=; b=VA3E/oJYYWoknN+VQ0gje0omhN6zbN44qfhoiOFcIU97ehiNS5HlDNInNsgkEzq99lPy3s rHp1AXB9zEepemVpubOeRzcpKIDefyjba+PHJs8uBXhsvownMsSVp8yFTxMOitATLX/E4s WWmh0yUF8pt+HWmsayxJnblAgha0JGKjh71NZ5ahObDEHbAD6d4ClK/dnhqoFayTonVp1a yYQVl5+TON/QLl+qW4cuWkPgDNtfS+Kscb9Tqj2Lx4/ZPkMQVYPgg/r0lI4RMeuZ/Z2Kdr SEVuT0JCxvTi7nSOQwCckNDhHYSHaAHxpdmLFbMKK7VEwjGzbCWEHfXeZzH8vA== From: Tomi Ollila To: Jonas Bernoulli , notmuch@notmuchmail.org Cc: "David Bremner" Subject: Re: [PATCH 0/4] emacs: avoid type errors due to nil as content-type In-Reply-To: <87mtxescw2.fsf@bernoul.li> References: <20210110184722.29294-1-jonas@bernoul.li> <87mtxescw2.fsf@bernoul.li> User-Agent: Notmuch/0.31.3+83~gfe438d5 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1610460150; a=rsa-sha256; cv=none; b=rrgHfoGGz4Pd6pIrNGociSQRIszqjitfXhwLzVvcWetffZv1Q+mcCsaoH+gTwirY6jL6gh 7yw08COwjHV/IEahCiUngl3zH3PlJ1GYvfQ5UDUcjsBTw/i9K+NHvWzmIhJa2r4Ia4gV3+ NeWSGKMcbXeGRb6eom/JT5bSFeUGfSpV3mGKk5NoVDvV8hHZMZHgeyXomy3ei37LEDJy6+ jxz4eFq4S5UhgS5Hmu5g4qUqMKgpRSX2qanBaTRFk2J0/UXOrGe/FH8VnyDsyi3phedNVL QwQ9cf27y+39gjt0b3JyM1LQ6OhHe/FtRsxdTz18S8FeQaVqfw9UYnfaHZI/Iw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1610460150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q5XV8DtfYUVqpa2NFJdqMdlaOBg79Iwt3QX3FZ6l8xs=; b=KoaSsv+72Z4k5pS+sb4cRz/UXFUDvDyoF0yP3Bo6yLk8fJYcVhLZetJC5Ie+aRtlLP1/7Z +L/DB4Js65KsRBLOOlalgyB0eEngAEn4i9bhPToclA0QJR0M1ncKs0TlWXkn7dW8apL6CO luvUlga9hsMzotBCjieNAeD7tzZhLVXKblau/rIkItGp4QyXT0u9SwGgmftC9hWnMk6Tq2 dBBw1qWjrqmJFR0NqXSoTUwgnXyEUV1iOwRANWKXNIE7HezUSQQfnD6Nabgr65gM2O8NyV +KdA4tuiYkO4IEQVdLSXmA8SiInJQnurUWuQj4EhsO8Ick7uhLLYfXgWLkKoxQ== Message-ID-Hash: DAD74FX6H6AOSBF3HECBYWMWXS6C6UFM X-Message-ID-Hash: DAD74FX6H6AOSBF3HECBYWMWXS6C6UFM X-MailFrom: tomi.ollila@iki.fi 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" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.92 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=VA3E/oJY; arc=reject (signature check failed: fail, {[1] = sig:iki.fi:reject}); 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: A3E439403A2 X-Spam-Score: 0.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1NcpNm/u+h96 On Tue, Jan 12 2021, Jonas Bernoulli wrote: > Tomi Ollila writes: >> Note that messages >> >> 20210110140112.25930-11-jonas@bernoul.li and >> 20210110140112.25930-12-jonas@bernoul.li >> >> have base64 -encoded content, with CRLF line endings >> so those don't apply as is, but CR's from the encoded >> content must be deleted. > > Do you know why git would decide to send these commits that way? I do know: In my case: - git format-patch ... - in one of the patch files there are utf-8 characters - git send-email (to mailing list and to tomi.ollila@iki.fi) - first stop in email is in smtp.iki.fi (which I use to send email) - the email that returns directly from iki.fi does not have base64 encoded content *nor* CR's in email body - the mail that is sent to notmuchmail.org, will contain CRLF line endings; either smtp.iki.fi adds those or notmuchmail.org smtpd added those - the mailman in notmuchmail.org notices that there is 8bit content in email body, and decides to base64-encode the whole content with CRLF line endings. - git am, the --no-keep-cr option (default) if not effective in "embedded" base64-encoded content. That particular feature is just for that purpose that smtp content should have CRLF line endings and the files those patches refer to often don't have (--keep-cr can be used if CRLF file endings are expected). It is a "feature" that in base64-encoded content is handled as verbatim by git-am, git-apply and so on. For reference: the email https://www.mail-archive.com/notmuch@notmuchmail.org/msg50113.html got directly (via-iki-smtpd) and via mailing list (via-notmuch-mailman) has the following headers (among other headers) in my mail storage (and as said above, the one got directly did not have CRLF line endings) $ grep Content via-iki-smtpd via-notmuch-mailman via-iki-smtpd:Content-Type: text/plain; charset=UTF-8 via-iki-smtpd:Content-Transfer-Encoding: 8bit via-notmuch-mailman:Content-Type: text/plain; charset="utf-8" via-notmuch-mailman:Content-Transfer-Encoding: base64 > Maybe we should try to keep it from doing that? I didn't write > down the prompt but git actually asked something along the line > of "for these two messages you have to select the base64 encoding, > does utf-8 work for you?". Right, the base64 encoding can be used when using git send-email, but how many knows to do that :) (Tried to look what option is it, but man git-send-email gave me manpage of version 1.7.1 >;/). Other options: - modify mailman (David Bremner contacted mailman mailing list, they don't think that is a bug (well IMO is it not a bug, but...) anyway one could hack locally ;/ (or the smtpd frontend if there is any) - modify git-am (based on Julio Hamano's comment on some mailing list something like if there is clear and sound implementation -- was it some filter option then something could get in... (or something)) - based on irclogs (2020-08) David has tool to be offered to (debian)-mailscripts to filter CR's out from base64-encoded content. -- which I think is better place as this problem isn't notmuch specific (although having such a tool in devel/ would be more convenient for me) > > Jonas Tomi