[PATCH] Fix non-POSIX sed usage

30 views
Skip to first unread message

Wolfgang Jenkner

unread,
Jul 7, 2017, 7:52:43 PM7/7/17
to mbl...@googlegroups.com
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:

0001-Fix-non-POSIX-sed-usage.patch

Leah Neukirchen

unread,
Jul 8, 2017, 2:49:11 PM7/8/17
to Wolfgang Jenkner, mbl...@googlegroups.com
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

Wolfgang Jenkner

unread,
Jul 12, 2017, 2:30:01 PM7/12/17
to Leah Neukirchen, mbl...@googlegroups.com
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?


Leah Neukirchen

unread,
Jul 12, 2017, 3:12:29 PM7/12/17
to Wolfgang Jenkner, mbl...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages