🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
4 messages
4 total messages Started by Vincent Lefevre Thu, 05 Nov 2026 12:40
Bug#1153100: mairix: incorrect parsing of multipart/mixed MIME messages
#3333
Author: Vincent Lefevre
Date: Thu, 05 Nov 2026 12:40
8 lines
2215 bytes
Control: found -1 0.24-2

and both stable and testing are affected too.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Bug#1153100: mairix: incorrect parsing of multipart MIME messages
#3339
Author: Vincent Lefevre
Date: Thu, 05 Nov 2026 14:20
46 lines
3570 bytes
Control: retitle -1 mairix: incorrect parsing of multipart MIME messages

as this also occurs with multipart/alternative messages.

Moreover, if I add an equal character at the beginning of the
boundary, i.e.

[...]
  Content-Type: multipart/mixed;
   boundary="=a1e1a426b4e573a063c94639eec8fca7"
[...]
  --=a1e1a426b4e573a063c94639eec8fca7
[...]
  --=a1e1a426b4e573a063c94639eec8fca7
[...]
  --=a1e1a426b4e573a063c94639eec8fca7--
[...]

then the error disappears. But the parsing is still incorrect!

I suppose that mairix interprets "=" as starting a quoted-printable
character everywhere after the main header (thus including "=a1" in
the boundary) before matching the boundary, so that boundary matching
silently fails, and mairix does not index any content (since it
considers that this doesn't belong to any part). Note that Mutt
sees the attachments as expected.

For instance, with boundary="a1e1a426b4e573a063c94639eec8fca7",
and searching for "abc" (which is YWJj converted from base64 in
the second attachment), one gets as expected:

disset:/tmp> mairix -f mairixrc abc
Matched 1 messages

(despite the errors when indexing). But with the equal character,
i.e. with boundary="=a1e1a426b4e573a063c94639eec8fca7":

disset:/tmp> mairix -f mairixrc abc
Matched 0 messages
disset:/tmp> mairix -f mairixrc YWJj
Matched 0 messages

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Bug#1153100: mairix: incorrect parsing of multipart MIME messages due to Content-Transfer-Encoding in the main headers
#3343
Author: Vincent Lefevre
Date: Thu, 05 Nov 2026 16:10
41 lines
4271 bytes
--qP44/vsGWc33Q0p5
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Control: retitle -1 mairix: incorrect parsing of multipart MIME messages due to Content-Transfer-Encoding in the main headers
Control: tags -1 upstream
Control: forwarded -1 https://github.com/vandry/mairix/issues/43

I've reported the bug upstream, with a testcase as a shell script
(so it is easier to test), also attached here.

As I've said there, the "Content-Transfer-Encoding: quoted-printable"
header is invalid. However, it occurs in practice, and a user who
receives such mail is not responsible. So mairix should be robust and
handle this case gracefully by ignoring this useless/misleading header.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

--qP44/vsGWc33Q0p5
Content-Type: application/x-sh
Content-Disposition: attachment; filename=multipart-parsing.sh
Content-Transfer-Encoding: quoted-printable

#!/bin/sh=0A=0Aset -x=0Aset -e=0Adir=3D/tmp/mairix-test=0Arm -rf $dir=0Amkd=
ir $dir=0Acd $dir=0A=0Acat <<EOF > mairixrc=0Abase=3D$dir=0Amaildir=3Dtest=
=0Amfolder=3Dvfolder=0Amformat=3Dmaildir=0Adatabase=3D$dir/.mairix=0AEOF=0A=
=0Amaildirmake test=0A=0Aaddmsg()=0A{=0A  boundary=3D"${2}a1e1a426b4e573a06=
3c94639eec8fca7"=0A  cat <<EOF > test/cur/1793874839.498391_${1}.qaa:2,S=0A=
Subject: msg ${1}=0AContent-Type: multipart/mixed;=0A boundary=3D"${boundar=
y}"=0AContent-Transfer-Encoding: ${3}=0AMIME-Version: 1.0=0A=0A--${boundary=
}=0AContent-Type: text/plain; charset=3Dutf-8=0AContent-Disposition: inline=
=0A=0Aabc=0A--${boundary}=0AContent-Type: text/plain=0AContent-Disposition:=
 attachment; filename=3D"De_.txt"=0A=0Adef=0A--${boundary}--=0AEOF=0A}=0A=
=0Aaddmsg 1 '-' quoted-printable=0Aaddmsg 2 '=3D' quoted-printable=0Aaddmsg=
 3 '=3D' 8bit=0Amairix -f mairixrc -v=0Amairix -f mairixrc abc || true=0Als=
 -l vfolder/cur=0Amairix -f mairixrc def || true=0Als -l vfolder/cur=0A
--qP44/vsGWc33Q0p5--
Bug#1153100: mairix: incorrect parsing of multipart MIME messages due to Content-Transfer-Encoding in the main headers
#3358
Author: Benj. Mako Hill
Date: Thu, 05 Nov 2026 18:10
67 lines
4904 bytes
--qrvep5erdkalbnnk
Content-Type: text/plain; protected-headers=v1; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Subject: Re: Bug#1153100: mairix: incorrect parsing of multipart MIME
 messages due to Content-Transfer-Encoding in the main headers
MIME-Version: 1.0

Greetings!

Thanks for reporting this and for the work to debug this and provide
more detail. I have built a working patch based on your fix
here. I'm going to try to integrate it into a couple of other things
and will push out a test soon.

Thanks for your help and support in the project of maintaining mairix
in Debian!

Later,
Mako


{"quotation": {"who": "Vincent Lefevre", "date": "Thu, Nov 05, 2026 at 05:0=
7:47PM +0100"}}
> Control: retitle -1 mairix: incorrect parsing of multipart MIME messages =
due to Content-Transfer-Encoding in the main headers
> Control: tags -1 upstream
> Control: forwarded -1 https://github.com/vandry/mairix/issues/43
>=20
> I've reported the bug upstream, with a testcase as a shell script
> (so it is easier to test), also attached here.
>=20
> As I've said there, the "Content-Transfer-Encoding: quoted-printable"
> header is invalid. However, it occurs in practice, and a user who
> receives such mail is not responsible. So mairix should be robust and
> handle this case gracefully by ignoring this useless/misleading header.
> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)



--=20
Benjamin Mako Hill
https://mako.cc/

--qrvep5erdkalbnnk
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEfGsMgrD+o7iQi1uRu+m/omm+WTUFAmrsxIcACgkQu+m/omm+
WTUxrxAAizFcm+1Grv/SPtRMr60soIsr9ko4RKJm48NqHNlnsm0AwWXWAooP1K/j
P2veLWI+uUZtsgXA4BMbCN5TLMywrlESMqN9QoJtkaZFl+G+pagHINzfTsVKNI3Y
3RiwU+w5nobga8YmLTBw6EqnzmzOE/OMS0OEgWDzCdcQvr+utl0R3V5woTBgP2nn
u7fWD+faRnSc59DLwN0R4zW9LCVxCN5e1MO2EXAZSrWGx/Mz0ob79Yysmh3niMNb
LYj3QvysornBzJNuCInhgzPJKgw10isEKhiZIq3XjddJ0oxGCa0tnPV5GfNjNifs
V5Cy9YnSJOL+l84OooJPd3FhefTbWcpH9QFFGG0cwhhTTeVrD4brRUREbkvtGI0J
xku+lYDG0Da/AP47BVLVK2xy/91QjE2o1END7+irIy5iwBt/2mhy+tIAbfJ4zljo
F3xcdgz0EXC+8Rs01i/qgp5tMiZ/X2YbMW1ly4qq/NldH1RI8gO+wAFFZlOoGZoh
aGft7ZdKUrXOnrPTXveISQiK3ioylfgJtkmSwL12k8Yu7UyLMz1H4CVLZ2akBtsV
K9vFuS6AM6//TCKNHFMq6I/YJjo5XrUK5yAW2KV53OQXKLqL8EhWAXOSKCsJVbhC
8wd25bvRxhQV7GAhZ9K339H6iHY/pAn8bcJ5Z0Hzo/l7d6Tamzc=
=JmxO
-----END PGP SIGNATURE-----

--qrvep5erdkalbnnk--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads