[-- Attachment #1: Type: text/plain, Size: 156 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987280426 Comment: Fixed in cf5493b.
[-- Attachment #1: Type: text/plain, Size: 5305 bytes --] Closed issue by rapenne-s on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257 Description: hi, when I apply `mmime` (from OpenBSD packages) on an email sent from tuta.io, a newline is added to the field DKIM-Signature, which breaks the email my sample email to reproduce it (I slightly modified the original to redact some addresses) ``` Return-Path: <test@tuta.io> Delivered-To: solene Received: from localhost by smth.redacted.something with LMTP id 9oG6LQu97GVYPQAA23Ik0Q (envelope-from <test@tuta.io>) for <solene>; Sat, 09 Mar 2024 20:48:27 +0100 Return-Path: <test@tuta.io> Delivered-To: contact@redacted.something Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by smth.redacted.something (OpenSMTPD) with ESMTPS id 51454e78 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <contact@redacted.something>; Sat, 9 Mar 2024 20:48:26 +0100 (CET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 6F6DCFBFC70 for <contact@redacted.something>; Sat, 9 Mar 2024 19:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710013705; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Jr8DQlZ7RwdJv94m7ZT/v+cv/WFsgjxpMRsHvnNfgGY=; b=NXRl0YxYtVsWrR8v7tVKnvsnCSrBqqaf2h3m8OVGlzG0OqMqGcWg7fVk6x4nTYV+ +05afZrGfIwcfFwIe/LLvT0d3/12t4+cs/FQvmEcFUN+n2buQwt5sn8f76UUlvNMrGz Xbq8HAdwhA364yWABa7DrF1EGysC8bEDJcCtSs/Wz3TL2A/MEeItEF+VijtgWUwoOwn rFKkCg5Df+IOd4gEBS/KYLbzcMB1dvqy+ut2LA2+NZpzJQPgbJzWAYieT9KYgoS+hKS 5FfknNT+hKZz18IBEWH1UWbI+CcLRR8Sr80x2DZUKq8ryC5RmV5/uAc5Up03b/KZGRU NsiBAQCx3w== Date: Sat, 9 Mar 2024 20:48:25 +0100 (CET) From: test@tuta.io To: Contact <contact@redacted.something> Message-ID: <NsZkace--3-9@tuta.io> Subject: test MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_417017_2033693008.1710013705448" ------=_Part_417017_2033693008.1710013705448 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit test -- ------=_Part_417017_2033693008.1710013705448 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <div dir="auto">test</div><div dir="auto"><br></div><div dir="auto">-- <br></div></body> </html> ------=_Part_417017_2033693008.1710013705448-- ``` If you pipe it to `mmime` you obtain this result: ``` Return-Path: <test@tuta.io> Delivered-To: solene Received: from localhost by smth.redacted.something with LMTP id 9oG6LQu97GVYPQAA23Ik0Q (envelope-from <test@tuta.io>) for <solene>; Sat, 09 Mar 2024 20:48:27 +0100 Return-Path: <test@tuta.io> Delivered-To: contact@redacted.something Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by smth.redacted.something (OpenSMTPD) with ESMTPS id 51454e78 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <contact@redacted.something>; Sat, 9 Mar 2024 20:48:26 +0100 (CET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 6F6DCFBFC70 for <contact@redacted.something>; Sat, 9 Mar 2024 19:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710013705; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Jr8DQlZ7RwdJv94m7ZT/v+cv/WFsgjxpMRsHvnNfgGY=; b=NXRl0YxYtVsWrR8v7tVKnvsnCSrBqqaf2h3m8OVGlzG0OqMqGcWg7fVk6x4nTYV+ +05afZrGfIwcfFwIe/LLvT0d3/12t4+cs/FQvmEcFUN+n2buQwt5sn8f76UUlvNMrGz Xbq8HAdwhA364yWABa7DrF1EGysC8bEDJcCtSs/Wz3TL2A/MEeItEF+VijtgWUwoOwn rFKkCg5Df+IOd4gEBS/KYLbzcMB1dvqy+ut2LA2+NZpzJQPgbJzWAYieT9KYgoS+hKS 5FfknNT+hKZz18IBEWH1UWbI+CcLRR8Sr80x2DZUKq8ryC5RmV5/uAc5Up03b/KZGRU NsiBAQCx3w== Date: Sat, 9 Mar 2024 20:48:25 +0100 (CET) From: test@tuta.io To: Contact <contact@redacted.something> Message-ID: <NsZkace--3-9@tuta.io> Subject: test MIME-Version: 1.0 boundary="----=_Part_417017_2033693008.1710013705448" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_3e0505e6347f3ecf153c1566_=_" This is a multipart message in MIME format. ------_=_3e0505e6347f3ecf153c1566_=_ Content-Type: multipart/alternative; Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ------=3D_Part_417017_2033693008.1710013705448 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 7bit test --=20 ------=3D_Part_417017_2033693008.1710013705448 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8= "> </head> <body> <div dir=3D"auto">test</div><div dir=3D"auto"><br></div><div dir=3D"auto">-= - <br></div></body> </html> ------=3D_Part_417017_2033693008.1710013705448-- ------_=_3e0505e6347f3ecf153c1566_=_-- ```
[-- Attachment #1: Type: text/plain, Size: 214 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987271344 Comment: Nah, your code is correct: it checks we are not at the beginning of a line.
[-- Attachment #1: Type: text/plain, Size: 268 bytes --] New comment by rapenne-s on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987269711 Comment: > want to make a PR or shall i just pick it up? please fix it, I feel I randomly fixed it without understanding the consequences ;)
[-- Attachment #1: Type: text/plain, Size: 184 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987268827 Comment: want to make a PR or shall i just pick it up?
[-- Attachment #1: Type: text/plain, Size: 246 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987268594 Comment: yes, sounds reasonable. in theory, one could wrap the `h=` after `:`, but this requires special knowledge.
[-- Attachment #1: Type: text/plain, Size: 755 bytes --] New comment by rapenne-s on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987267017 Comment: I got a diff with which the tests pass, not sure it's good though ``` diff --git a/mmime.c b/mmime.c index 6334569..b521efc 100644 --- a/mmime.c +++ b/mmime.c @@ -347,7 +347,7 @@ print_header(char *line) { if (!highbit) { if (e-s >= 998) goto force_qp; - if (e-s >= 78 - linelen) { + if (e-s >= 78 - linelen && linelen > 0) { // wrap in advance before long word printf("\n"); linelen = 0; ```
[-- Attachment #1: Type: text/plain, Size: 204 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987266942 Comment: Ok, I can reproduce this. Let me see how to solve this properly.
[-- Attachment #1: Type: text/plain, Size: 364 bytes --] New comment by rapenne-s on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257#issuecomment-1987250905 Comment: The extra newline character comes from this line in mmime.c https://github.com/leahneukirchen/mblaze/blob/master/mmime.c#L352 However, removing it breaks the tests and I don't think it's the right solution anyway :sweat_smile:
[-- Attachment #1: Type: text/plain, Size: 5277 bytes --] New issue by rapenne-s on mblaze repository https://github.com/leahneukirchen/mblaze/issues/257 Description: hi, when I apply `mmime` on an email sent from tuta.io, a newline is added to the field Dkim-signature which breaks the email my sample email to reproduce it (I slightly modified the original to redact some addresses) ``` Return-Path: <test@tuta.io> Delivered-To: solene Received: from localhost by smth.redacted.something with LMTP id 9oG6LQu97GVYPQAA23Ik0Q (envelope-from <test@tuta.io>) for <solene>; Sat, 09 Mar 2024 20:48:27 +0100 Return-Path: <test@tuta.io> Delivered-To: contact@redacted.something Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by smth.redacted.something (OpenSMTPD) with ESMTPS id 51454e78 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <contact@redacted.something>; Sat, 9 Mar 2024 20:48:26 +0100 (CET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 6F6DCFBFC70 for <contact@redacted.something>; Sat, 9 Mar 2024 19:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710013705; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Jr8DQlZ7RwdJv94m7ZT/v+cv/WFsgjxpMRsHvnNfgGY=; b=NXRl0YxYtVsWrR8v7tVKnvsnCSrBqqaf2h3m8OVGlzG0OqMqGcWg7fVk6x4nTYV+ +05afZrGfIwcfFwIe/LLvT0d3/12t4+cs/FQvmEcFUN+n2buQwt5sn8f76UUlvNMrGz Xbq8HAdwhA364yWABa7DrF1EGysC8bEDJcCtSs/Wz3TL2A/MEeItEF+VijtgWUwoOwn rFKkCg5Df+IOd4gEBS/KYLbzcMB1dvqy+ut2LA2+NZpzJQPgbJzWAYieT9KYgoS+hKS 5FfknNT+hKZz18IBEWH1UWbI+CcLRR8Sr80x2DZUKq8ryC5RmV5/uAc5Up03b/KZGRU NsiBAQCx3w== Date: Sat, 9 Mar 2024 20:48:25 +0100 (CET) From: test@tuta.io To: Contact <contact@redacted.something> Message-ID: <NsZkace--3-9@tuta.io> Subject: test MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_417017_2033693008.1710013705448" ------=_Part_417017_2033693008.1710013705448 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit test -- ------=_Part_417017_2033693008.1710013705448 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <div dir="auto">test</div><div dir="auto"><br></div><div dir="auto">-- <br></div></body> </html> ------=_Part_417017_2033693008.1710013705448-- ``` If you pipe it to `mmime` you obtain this result: ``` Return-Path: <test@tuta.io> Delivered-To: solene Received: from localhost by smth.redacted.something with LMTP id 9oG6LQu97GVYPQAA23Ik0Q (envelope-from <test@tuta.io>) for <solene>; Sat, 09 Mar 2024 20:48:27 +0100 Return-Path: <test@tuta.io> Delivered-To: contact@redacted.something Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by smth.redacted.something (OpenSMTPD) with ESMTPS id 51454e78 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <contact@redacted.something>; Sat, 9 Mar 2024 20:48:26 +0100 (CET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 6F6DCFBFC70 for <contact@redacted.something>; Sat, 9 Mar 2024 19:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710013705; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Jr8DQlZ7RwdJv94m7ZT/v+cv/WFsgjxpMRsHvnNfgGY=; b=NXRl0YxYtVsWrR8v7tVKnvsnCSrBqqaf2h3m8OVGlzG0OqMqGcWg7fVk6x4nTYV+ +05afZrGfIwcfFwIe/LLvT0d3/12t4+cs/FQvmEcFUN+n2buQwt5sn8f76UUlvNMrGz Xbq8HAdwhA364yWABa7DrF1EGysC8bEDJcCtSs/Wz3TL2A/MEeItEF+VijtgWUwoOwn rFKkCg5Df+IOd4gEBS/KYLbzcMB1dvqy+ut2LA2+NZpzJQPgbJzWAYieT9KYgoS+hKS 5FfknNT+hKZz18IBEWH1UWbI+CcLRR8Sr80x2DZUKq8ryC5RmV5/uAc5Up03b/KZGRU NsiBAQCx3w== Date: Sat, 9 Mar 2024 20:48:25 +0100 (CET) From: test@tuta.io To: Contact <contact@redacted.something> Message-ID: <NsZkace--3-9@tuta.io> Subject: test MIME-Version: 1.0 boundary="----=_Part_417017_2033693008.1710013705448" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_3e0505e6347f3ecf153c1566_=_" This is a multipart message in MIME format. ------_=_3e0505e6347f3ecf153c1566_=_ Content-Type: multipart/alternative; Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ------=3D_Part_417017_2033693008.1710013705448 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 7bit test --=20 ------=3D_Part_417017_2033693008.1710013705448 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8= "> </head> <body> <div dir=3D"auto">test</div><div dir=3D"auto"><br></div><div dir=3D"auto">-= - <br></div></body> </html> ------=3D_Part_417017_2033693008.1710013705448-- ------_=_3e0505e6347f3ecf153c1566_=_-- ```
[-- Attachment #1: Type: text/plain, Size: 188 bytes --] New comment by Anachron on mblaze repository https://github.com/leahneukirchen/mblaze/pull/226#issuecomment-1873226257 Comment: Can this be added before new release? @leahneukirchen
[-- Attachment #1: Type: text/plain, Size: 153 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/251#issuecomment-1872976312 Comment: Yes yes, soon!
[-- Attachment #1: Type: text/plain, Size: 183 bytes --] New comment by sansfontieres on mblaze repository https://github.com/leahneukirchen/mblaze/issues/251#issuecomment-1872973761 Comment: That would be brilliant for nixpkgs too 😋
[-- Attachment #1: Type: text/plain, Size: 302 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/256#issuecomment-1864517565 Comment: Currently not, I guess we could remove them with -N maybe, but they kinda imply there's something in the mail that you are missing, so imo good to have by default.
[-- Attachment #1: Type: text/plain, Size: 221 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/254#issuecomment-1864511892 Comment: This sounds useful. Perhaps we could print a 'X-Mblaze-Seq:' header or something?
[-- Attachment #1: Type: text/plain, Size: 185 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/253#issuecomment-1864507539 Comment: I guess mlist could print absolute paths, yes.
[-- Attachment #1: Type: text/plain, Size: 260 bytes --] New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/255#issuecomment-1864506816 Comment: Duplicate of https://github.com/leahneukirchen/mblaze/issues/247 This is not so easy to fix without additional work :(
[-- Attachment #1: Type: text/plain, Size: 933 bytes --] Closed issue by algor512 on mblaze repository https://github.com/leahneukirchen/mblaze/issues/255 Description: The numbering of MIME parts differs in `mshow` and `mshow -t`, for example, `mshow` shows ``` From: <...> Subject: Test To: <...> Date: Tue, 19 Dec 2023 17:45:46 +0100 (CET) (18 hours, 28 minutes, 29 seconds ago) --- 1: multipart/mixed size=3224058 --- --- --- 2: multipart/alternative size=451 --- --- --- --- 3: text/plain size=13 --- Test email. --- --- 4: image/jpeg size=2175349 name="img.jpg" --- no filter or default handler --- --- 5: application/pdf size=210485 name="doc.pdf" --- no filter or default handler ``` while `mshow -t` shows ``` <path to file> 1: multipart/mixed size=3224058 2: multipart/alternative size=451 3: text/plain size=13 4: text/html size=166 5: image/jpeg size=2175349 name="img.jpg" 6: application/pdf size=210485 name="doc.pdf" ```
[-- Attachment #1: Type: text/plain, Size: 203 bytes --] New issue by algor512 on mblaze repository https://github.com/leahneukirchen/mblaze/issues/256 Description: Is there any way to disable these messages? They are shown even in the output of `mshow -N`.
[-- Attachment #1: Type: text/plain, Size: 930 bytes --] New issue by algor512 on mblaze repository https://github.com/leahneukirchen/mblaze/issues/255 Description: The numbering of MIME parts differs in `mshow` and `mshow -t`, for example, `mshow` shows ``` From: <...> Subject: Test To: <...> Date: Tue, 19 Dec 2023 17:45:46 +0100 (CET) (18 hours, 28 minutes, 29 seconds ago) --- 1: multipart/mixed size=3224058 --- --- --- 2: multipart/alternative size=451 --- --- --- --- 3: text/plain size=13 --- Test email. --- --- 4: image/jpeg size=2175349 name="img.jpg" --- no filter or default handler --- --- 5: application/pdf size=210485 name="doc.pdf" --- no filter or default handler ``` while `mshow -t` shows ``` <path to file> 1: multipart/mixed size=3224058 2: multipart/alternative size=451 3: text/plain size=13 4: text/html size=166 5: image/jpeg size=2175349 name="img.jpg" 6: application/pdf size=210485 name="doc.pdf" ```
[-- Attachment #1: Type: text/plain, Size: 299 bytes --] New issue by bsdmp on mblaze repository https://github.com/leahneukirchen/mblaze/issues/254 Description: in nmh 'show all' gives every message a title like [ Message inbox:X ], so i can do easily 'repl X' where X is the number of the message - is it possible to get the same title from "mshow :"?
[-- Attachment #1: Type: text/plain, Size: 476 bytes --] New issue by algor512 on mblaze repository https://github.com/leahneukirchen/mblaze/issues/253 Description: I've noticed that after running something like ``` mlist <relative path to maildir> | mseq -S ``` the sequence file $MBLAZE/seq contains relative paths to message files. From my perspective, it would be nice to convert them into absolute paths, as, I believe, a user expects mblaze to use the same files after changing the current directory. At least, I do so:)
[-- Attachment #1: Type: text/plain, Size: 624 bytes --] There is an updated pull request by rakoo against master on the mblaze repository https://github.com/rakoo/mblaze master https://github.com/leahneukirchen/mblaze/pull/234 Improve attachments handling I had to manually explore to understand how to add attachments, the man page was a bit evasive. It also didn't help that a `~` at the beginning of the path isn't caught, so I added the same treatment as outbox parsing. Thanks for this fantastic piece of software, the joys of building one's own MUA in ~150 lines of shell scripts... A patch file from https://github.com/leahneukirchen/mblaze/pull/234.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-234.patch --] [-- Type: text/x-diff, Size: 1367 bytes --] From 216be7d5f2f2ec120adb3f9aa4728b01eb48f0fe Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona <m@rako.space> Date: Sat, 11 Nov 2023 02:01:19 +0100 Subject: [PATCH 1/2] Attach all files when forwarding in raw mode --- mcom | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mcom b/mcom index 4e834c6..e62b759 100755 --- a/mcom +++ b/mcom @@ -306,6 +306,19 @@ fi msgid museragent cat "$MBLAZE/headers" 2>/dev/null + if [ -n "$raw" ]; then + prev=$(pwd) + attachdir=$(mktemp -d) + cd $attachdir + trap 'rm -r "$attachdir"' EXIT + + mseq -r "$@" \ + | xargs -I {} mshow -Bx {} \ + | xargs --null realpath \ + | sed '/^$/d; s/^/Attach: /' + cd $prev + fi + printf '\n\n' if [ -z "$raw" ]; then mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:' From 8effd1244ef13739d986ac06c1806076d8d6a33b Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona <m@rako.space> Date: Fri, 24 Nov 2023 13:54:04 +0100 Subject: [PATCH 2/2] Don't ask for confirmation when deleting draft --- mcom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcom b/mcom index e62b759..e52fb9a 100755 --- a/mcom +++ b/mcom @@ -544,7 +544,7 @@ while :; do c=send ;; d|delete) - rm -i "$draft" + rm "$draft" if ! [ -f "$draft" ]; then rm -f "$draftmime" printf '%s\n' "mcom: deleted draft $draft"
[-- Attachment #1: Type: text/plain, Size: 589 bytes --] There is an updated pull request by rakoo against master on the mblaze repository https://github.com/rakoo/mblaze mfwd_attachments https://github.com/leahneukirchen/mblaze/pull/252 Attach all files when forwarding in raw mode I want to use forwarding with raw messages because it's just easier to work with from the point of view of receivers. The problem is that when "flattening" the message, attachments are lost. This PR extracts them in a temporary folder and adds them to the message to be sent A patch file from https://github.com/leahneukirchen/mblaze/pull/252.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-mfwd_attachments-252.patch --] [-- Type: text/x-diff, Size: 807 bytes --] From 216be7d5f2f2ec120adb3f9aa4728b01eb48f0fe Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona <m@rako.space> Date: Sat, 11 Nov 2023 02:01:19 +0100 Subject: [PATCH] Attach all files when forwarding in raw mode --- mcom | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mcom b/mcom index 4e834c6..e62b759 100755 --- a/mcom +++ b/mcom @@ -306,6 +306,19 @@ fi msgid museragent cat "$MBLAZE/headers" 2>/dev/null + if [ -n "$raw" ]; then + prev=$(pwd) + attachdir=$(mktemp -d) + cd $attachdir + trap 'rm -r "$attachdir"' EXIT + + mseq -r "$@" \ + | xargs -I {} mshow -Bx {} \ + | xargs --null realpath \ + | sed '/^$/d; s/^/Attach: /' + cd $prev + fi + printf '\n\n' if [ -z "$raw" ]; then mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
[-- Attachment #1: Type: text/plain, Size: 624 bytes --] There is an updated pull request by rakoo against master on the mblaze repository https://github.com/rakoo/mblaze master https://github.com/leahneukirchen/mblaze/pull/234 Improve attachments handling I had to manually explore to understand how to add attachments, the man page was a bit evasive. It also didn't help that a `~` at the beginning of the path isn't caught, so I added the same treatment as outbox parsing. Thanks for this fantastic piece of software, the joys of building one's own MUA in ~150 lines of shell scripts... A patch file from https://github.com/leahneukirchen/mblaze/pull/234.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-master-234.patch --] [-- Type: text/x-diff, Size: 798 bytes --] From f17006eeb909f2a881ebf155485c3fb703fc5825 Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona <m@rako.space> Date: Sat, 11 Nov 2023 02:01:19 +0100 Subject: [PATCH] Attach all files when forwarding in raw mode --- mcom | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mcom b/mcom index 4e834c6..7981f65 100755 --- a/mcom +++ b/mcom @@ -306,6 +306,18 @@ fi msgid museragent cat "$MBLAZE/headers" 2>/dev/null + if [ -n "$raw" ]; then + prev=$(pwd) + attachdir=$(mktemp -d) + cd $attachdir + mseq -r "$@" \ + | xargs -I {} mshow -Bx {} \ + | IFS=$NL xargs realpath \ + | sed 's/^/Attach: /' + cd $prev + trap 'rm -r "$attachdir"' EXIT + fi + printf '\n\n' if [ -z "$raw" ]; then mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'