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 ms0.migadu.com with LMTPS id WOakIThOaGGbQAEAgWs5BA (envelope-from ) for ; Thu, 14 Oct 2021 17:35:20 +0200 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 IE1hHThOaGFtFgAAB5/wlQ (envelope-from ) for ; Thu, 14 Oct 2021 15:35:20 +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 024B3A996 for ; Thu, 14 Oct 2021 17:35:20 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DD0C62C1AF; Thu, 14 Oct 2021 11:35:15 -0400 (EDT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by mail.notmuchmail.org (Postfix) with ESMTPS id 779972C197 for ; Thu, 14 Oct 2021 11:35:12 -0400 (EDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A3CF521A8A; Thu, 14 Oct 2021 15:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634225710; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1lUiiYA1qff3CM8Erk1+1zxRVAB5TWeJ7BQzqQYtk1w=; b=0AXPQg3bSCk3SEt6ce1WN84PCpxmxJTpdaZaEtvLmiMvckvADH8CIGj/KrRneqk4eKAkxJ zoyjk7oOsc64myre0Z+gYn4WhduzuVsQG6cVgmyKiYez+zyU4cdbGAn75RZ2gFhABepqbi vPlB+fTRZ9I13Wk0Xpr4FwKyDKFTuxc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634225710; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1lUiiYA1qff3CM8Erk1+1zxRVAB5TWeJ7BQzqQYtk1w=; b=1SYnWQFsDT6n+Z/CAAUBHquGYd5EdKPMHkKRCqra+k2R3+qdI0UMjVBhmfCvQXiYGf8JwX 92K49SRb8jKOsCDA== Received: from suse.cz (virgil.suse.cz [10.100.13.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 83116A3B85; Thu, 14 Oct 2021 15:35:10 +0000 (UTC) From: Martin Jambor To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: Emacs notmuch extracts text attachments as if they had Windows (CRLF) encoding In-Reply-To: References: User-Agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/27.2 (x86_64-suse-linux-gnu) Date: Thu, 14 Oct 2021 17:35:10 +0200 Message-ID: MIME-Version: 1.0 Message-ID-Hash: US7YPSEKY2JI2TRSVHLHIHXA2I6QZOSM X-Message-ID-Hash: US7YPSEKY2JI2TRSVHLHIHXA2I6QZOSM X-MailFrom: mjambor@suse.cz 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634225720; 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=tkSFzOUZTFg4gGBDTriNCwvFTeAaXtlgGYTQ0xCM1wU=; b=TVqSycNEGVPm/F6mibsqJNNGIVIBDxWBKmWoqiXQdB6tjZt5N53wMOo646G6UWmQTX2gZ1 Nd1jYOhrc7GGuSspEcbUuYXP49I5+BPTF4C+Mb5KeI/MqfXhrTXIyubFQkXovKk7nT0zV/ rcMbyvq8rrXVCJlga9CDtYEeSRyMsiDvxDrlePk+qNOBlbQ3hhnj+yyaeQRQRmS5tz2tIw DR0+65cz5N7KZcpzzNFyWmL3MRL1xYKpLOGnb3Rz7vT1tnwYzfdjB0YDEAyGLqZlQgVOOl sbO19yT+BdbDo1yCSMBVr2Pgphfh2V+GmbNbndSnfs6O2+owsHyCV2KeRYHAWg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634225720; a=rsa-sha256; cv=none; b=dcRwLl8Tab4QAxt6HmjMjeqVTFGF1SRSyEnNUfFsICQOGPbWDQjPRCkhF5CIehK9HmvcJI KgPaaebt6O+yyx/EFYZ1K9fHQFb3txS0hiTOd2xX2JTUrMp9kCBHZOR3+hZzcrb2A+8QxD zWaCOaHCCplpamIVqhmpjQup+c9ul7CFt1iLOtpKSBDFhNs3HBNRigFnpZvJIgvZBwEO8W hg904oRtRMvO5qbplAsk8LPYp5b1OruuFglv8SjM+xME14/vV8BgnOn6rSfOHaFaJ+Jp0v vNWoJqe/8y9yian5skZ35yGbad9RjOg3Nhi5RfjRyvG8oKJ6O/Q1+oHn8DZ93g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=suse.cz header.s=susede2_rsa header.b=0AXPQg3b; dkim=fail ("body hash did not verify") header.d=suse.cz header.s=susede2_ed25519 header.b=1SYnWQFs; 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: -1.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=suse.cz header.s=susede2_rsa header.b=0AXPQg3b; dkim=fail ("body hash did not verify") header.d=suse.cz header.s=susede2_ed25519 header.b=1SYnWQFs; 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: 024B3A996 X-Spam-Score: -1.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: E9MfhaRJSwgv Hi, On Thu, Oct 14 2021, Tomi Ollila wrote: > On Wed, Oct 13 2021, Martin Jambor wrote: > >> Hi, >> >> I have stumbled upon strange behavior of emacs-notmuch. When I extract >> (some?) plain text attachments into files using notmuch-show-save-part >> (by pressing ".s"), the file they end up in has Windows encoding of line >> ends (CRLF) even though both the machine used to send and receive the >> email are Linux ones. >> >> I can reproduce the issue with the attached example email. Emacs >> notmuch extracts the attachment into a windows encoding file while mutt >> or metamail does not. >> >> Can anyone else reproduce this behavior? Any ideas how to fix it? > > Are you talking about this attachment in the gzipped email content: > > ---1609908220-525021627-1633684545=:5930 > Content-Type: text/plain; charset=US-ASCII; name=status > Content-Transfer-Encoding: BASE64 > Content-Description: test > Content-Disposition: attachment; filename=status > > U3RhdHVzDQo9PT09PT0NCg0KVGhlIEdDQyBkZXZlbG9wbWVudCBicmFuY2gg > ... > NTgzMS5odG1sDQo= > > ---1609908220-525021627-1633684545=:5930-- > > I manually extracted the BASE64 content, it does have the > CRLF line endings... > Thanks for looking into it. I guess that explains it then. Apparently the behavior of mutt (and possibly other email clients) is to convert the format to the local one. I did not expect metamail to do that, though. Thanks again, Martin