mblaze, a Maildir-focused command line mail client
 help / color / mirror / code / Atom feed
* [PATCH] Fix non-POSIX sed usage
@ 2017-07-07 23:50 Wolfgang Jenkner
  2017-07-08 18:49 ` Leah Neukirchen
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Jenkner @ 2017-07-07 23:50 UTC (permalink / raw)
  To: mblaze

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

Thanks for writing mblaze!

Here is a small bug: When replying to a message containing

 Message-Id: <dddddddddddddddddddddddddddddddddd@d>
 References: <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a> <bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@b> <ccccccccccccccccccccccccccccccc@c>

mrep(1) on FreeBSD 11 produces

 References:
  =?UTF-8?Q?_<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a>n<bbbbbbbbbbbbbbbbbbbbbb?=
  =?UTF-8?Q?bbbbbbbbbbbbbbb@b>n<ccccccccccccccccccccccccccccccc@c>?=
  <dddddddddddddddddddddddddddddddddd@d>

Here's a patch:


[-- Attachment #2: 0001-Fix-non-POSIX-sed-usage.patch --]
[-- Type: text/x-diff, Size: 580 bytes --]

From 1cd9d1567310f21fb2f7ef62c655b679b72dbf7e Mon Sep 17 00:00:00 2001
From: Wolfgang Jenkner <wjen...@inode.at>
Date: Thu, 6 Jul 2017 18:41:14 +0200
Subject: [PATCH] Fix non-POSIX sed usage

---
 mcom | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mcom b/mcom
index 0a3d219..63a0894 100755
--- a/mcom
+++ b/mcom
@@ -13,7 +13,8 @@ notmine() {
 }
 
 reffmt() {
-	sed 's/^[^<]*//g;s/[^>]*$//g;s/>[^<]*</>\n</g' | uniq | sed 's/^/ /'
+	sed 's/^[^<]*//g;s/[^>]*$//g;s/>[^<]*</>\
+</g' | uniq | sed 's/^/ /'
 }
 
 msgid() {
-- 
2.13.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix non-POSIX sed usage
  2017-07-07 23:50 [PATCH] Fix non-POSIX sed usage Wolfgang Jenkner
@ 2017-07-08 18:49 ` Leah Neukirchen
  2017-07-12 18:22   ` Wolfgang Jenkner
  0 siblings, 1 reply; 4+ messages in thread
From: Leah Neukirchen @ 2017-07-08 18:49 UTC (permalink / raw)
  To: Wolfgang Jenkner; +Cc: mbl...

Wolfgang Jenkner <wjen...@inode.at> writes:

> Thanks for writing mblaze!

> Subject: [PATCH] Fix non-POSIX sed usage

Thanks, applied!

-- 
Leah Neukirchen  <le...@vuxu.org>  http://leah.zone

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix non-POSIX sed usage
  2017-07-08 18:49 ` Leah Neukirchen
@ 2017-07-12 18:22   ` Wolfgang Jenkner
  2017-07-12 19:12     ` Leah Neukirchen
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Jenkner @ 2017-07-12 18:22 UTC (permalink / raw)
  To: Leah Neukirchen; +Cc: mbl...

Leah Neukirchen <le...@vuxu.org> wrote:
> > Subject: [PATCH] Fix non-POSIX sed usage
> 
> Thanks, applied!

Thank you.

There's still a point about the 'References' header which puzzles me:

mrep puts two spaces between 'References:' and the first message-id (at
line 148 and line 17 in mcom).  So, if the message-id is sufficiently
long (>= 78 - 11 - 2) it's actually qp-encoded, due to how print_header
in mmime.c works.

(This affects, e.g., gmail, which seems to produce message-ids of length
68.)

Is this intended?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix non-POSIX sed usage
  2017-07-12 18:22   ` Wolfgang Jenkner
@ 2017-07-12 19:12     ` Leah Neukirchen
  0 siblings, 0 replies; 4+ messages in thread
From: Leah Neukirchen @ 2017-07-12 19:12 UTC (permalink / raw)
  To: Wolfgang Jenkner; +Cc: mbl...

Wolfgang Jenkner <wjen...@inode.at> writes:

> Leah Neukirchen <le...@vuxu.org> wrote:
>> > Subject: [PATCH] Fix non-POSIX sed usage
>> 
>> Thanks, applied!
>
> Thank you.
>
> There's still a point about the 'References' header which puzzles me:
>
> mrep puts two spaces between 'References:' and the first message-id (at
> line 148 and line 17 in mcom).  So, if the message-id is sufficiently
> long (>= 78 - 11 - 2) it's actually qp-encoded, due to how print_header
> in mmime.c works.
>
> (This affects, e.g., gmail, which seems to produce message-ids of length
> 68.)
>
> Is this intended?

No, it's a bug.  References: must not use qp-encoding, but I didn't
want to add blacklisting yet...

But since 67c0a3b17c17 print_header should use up to 997 chars now, no?

Oh, I see.  The initial space breaks it.  Fixed in 73d80d8.

-- 
Leah Neukirchen  <le...@vuxu.org>  http://leah.zone

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-12 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 23:50 [PATCH] Fix non-POSIX sed usage Wolfgang Jenkner
2017-07-08 18:49 ` Leah Neukirchen
2017-07-12 18:22   ` Wolfgang Jenkner
2017-07-12 19:12     ` Leah Neukirchen

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mblaze/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).