Debian Bug report logs -
#918806
/usr/bin/mail.mailutils: Pipe text to mail and attach a csv sets content type to application/octet-stream not multipart/mixed
Reported by: Jason Davey <jdavey@enable.services>
Date: Wed, 9 Jan 2019 14:27:01 UTC
Severity: important
Found in versions 3.5-2, mailutils/1:3.5-1
Fixed in version mailutils/1:3.5-3
Done: Jordi Mallach <jordi@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Jordi Mallach <jordi@debian.org>:
Bug#918806; Package mailutils.
(Wed, 09 Jan 2019 14:27:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Jason Davey <jdavey@enable.services>:
New Bug report received and forwarded. Copy sent to Jordi Mallach <jordi@debian.org>.
(Wed, 09 Jan 2019 14:27:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: mailutils
Version: 1:3.5-1
Severity: important
File: /usr/bin/mail.mailutils
Dear Maintainer,
Command
===========
echo "body text" | /usr/bin/mail -s "some subject" -A "somefile.csv" my@email.com
Working
===========
Mailutils version 3.1.1
---------------------------------------------------------------------------------
Content-Type: multipart/mixed; boundary="1621296231-1547034776=:19256"
--1621296231-1547034776=:19256
Content-ID: <20190109115256.19256@xxx>
Content-Type: text/plain
body text
--1621296231-1547034776=:19256
Content-ID: <20190109115256.19256.1@xxx>
Content-Type: application/octet-stream; name=somefile.csv
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=somefile.csv
...
---------------------------------------------------------------------------------
Not Working
===========
Mailutils version 3.5
---------------------------------------------------------------------------------
Content-Type: application/octet-stream; name="somefile.csv"
Content-Transfer-Encoding: base64
...
---------------------------------------------------------------------------------
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.utf8), LANGUAGE=en_GB:en (charmap=UTF-8) (ignored: LC_ALL set to en_GB.utf8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mailutils depends on:
ii guile-2.2-libs 2.2.4+1-1
ii libc6 2.28-2
ii libfribidi0 1.0.5-3
ii libgc1c2 1:7.6.4-0.4
ii libgnutls30 3.6.5-2
ii libgsasl7 1.8.0-8+b2
ii libkyotocabinet16v5 1.2.76-4.2+b1
ii libldap-2.4-2 2.4.47+dfsg-1
ii libmailutils5 1:3.5-1
ii libncurses6 6.1+20181013-1
ii libpam0g 1.1.8-3.8
ii libpython2.7 2.7.15-5
ii libreadline7 7.0-5
ii libtinfo6 6.1+20181013-1
ii libwrap0 7.6.q-27
ii mailutils-common 1:3.5-1
ii postfix [mail-transport-agent] 3.3.2-1
mailutils recommends no packages.
Versions of packages mailutils suggests:
pn mailutils-doc <none>
pn mailutils-mh <none>
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Jordi Mallach <jordi@debian.org>:
Bug#918806; Package mailutils.
(Wed, 13 Mar 2019 15:03:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Jordi Mallach <jordi@debian.org>.
(Wed, 13 Mar 2019 15:03:03 GMT) (full text, mbox, link).
Message #10 received at 918806@bugs.debian.org (full text, mbox, reply):
Control: found 918806 3.5-2
On Wed 2019-01-09 14:16:09 +0000, Jason Davey wrote:
> Command
> ===========
> echo "body text" | /usr/bin/mail -s "some subject" -A "somefile.csv" my@email.com
I can confirm that the same misbehavior happens when invoked as "mailx",
fwiw. This is actually a data loss issue, because the body text sent on
stdin is entirely discarded. As such, i'd consider even elevating this
to a release-critical bug report.
fwiw, if i try to be clever and get it to consider the incoming text by
using:
mailx --content-type=text/plain --attach-fd=0 -s 'some subject' -A somefile.csv me@example.com
then i end up with an extremely weird multipart/mixed structure:
[…]
Content-Type: multipart/mixed; boundary="225007733-1552488518=:22450"
Subject: this is a test
To: <dkg@fifthhorseman.net>
X-Mailer: mail (GNU Mailutils 3.5)
Message-Id: <20190313144838.DAAF4204C8@fifthhorseman.net>
Date: Wed, 13 Mar 2019 10:48:38 -0400 (EDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
--225007733-1552488518=:22450
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-ID: <20190313104838.22450.1@alice.fifthhorseman.net>
Content-Transfer-Encoding: quoted-printable
--225007733-1552488518=:22450
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: base64
Content-ID: <20190313104838.22450.1@alice.fifthhorseman.net>
bW9ua2V5IG1hbiB0ZXN0aW5nCg==
--225007733-1552488518=:22450
Content-Type: text/plain; charset=UTF-8; name="hi.txt"
Content-Disposition: attachment; filename="hi.txt"
Content-Transfer-Encoding: base64
Content-ID: <20190313104838.22450.2@alice.fifthhorseman.net>
aGkK
--225007733-1552488518=:22450--
Regards,
--dkg
Marked as found in versions 3.5-2.
Request was from Daniel Kahn Gillmor <dkg@debian.org>
to 918806-submit@bugs.debian.org.
(Wed, 13 Mar 2019 15:03:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Jordi Mallach <jordi@debian.org>:
Bug#918806; Package mailutils.
(Wed, 13 Mar 2019 15:09:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
Extra info received and forwarded to list. Copy sent to Jordi Mallach <jordi@debian.org>.
(Wed, 13 Mar 2019 15:09:05 GMT) (full text, mbox, link).
Message #17 received at 918806@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi GNU Mailutils developers--
Are you aware of this report in debian about mail discarding stdin when
being used to send an e-mail with an attachment?
https://bugs.debian.org/918806
I can confirm that it's happening with mailutils 3.5, but have not
tested 3.6 against it, and i see no mention of the fix of such a severe
bug in the NEWS file in the 3.6 tarball.
It would be great to get some feedback on the debian bug report about
how/whether this is already known or fixed upstream.
Thanks for many years of great functionality in Mailutils!
Regards,
--dkg
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Jordi Mallach <jordi@debian.org>:
Bug#918806; Package mailutils.
(Wed, 13 Mar 2019 21:21:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Sergey Poznyakoff <gray@gnu.org.ua>:
Extra info received and forwarded to list. Copy sent to Jordi Mallach <jordi@debian.org>.
(Wed, 13 Mar 2019 21:21:04 GMT) (full text, mbox, link).
Message #22 received at 918806@bugs.debian.org (full text, mbox, reply):
Hi Daniel,
> Are you aware of this report in debian about mail discarding stdin when
> being used to send an e-mail with an attachment?
>
> https://bugs.debian.org/918806
Thanks for reporting. I fixed it in 43214185092e714e0c233bf196f571bba5c17be0.
Meanwhile, you can use the --mime option as a workaround:
echo "body text" | /usr/bin/mail --mime -s "some subject" -A "somefile.csv" my@email.com
Regards,
Sergey
Reply sent
to Jordi Mallach <jordi@debian.org>:
You have taken responsibility.
(Thu, 14 Mar 2019 09:06:05 GMT) (full text, mbox, link).
Notification sent
to Jason Davey <jdavey@enable.services>:
Bug acknowledged by developer.
(Thu, 14 Mar 2019 09:06:05 GMT) (full text, mbox, link).
Message #27 received at 918806-close@bugs.debian.org (full text, mbox, reply):
Source: mailutils
Source-Version: 1:3.5-3
We believe that the bug you reported is fixed in the latest version of
mailutils, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 918806@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jordi Mallach <jordi@debian.org> (supplier of updated mailutils package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Thu, 14 Mar 2019 09:32:01 +0100
Source: mailutils
Architecture: source
Version: 1:3.5-3
Distribution: unstable
Urgency: medium
Maintainer: Jordi Mallach <jordi@debian.org>
Changed-By: Jordi Mallach <jordi@debian.org>
Closes: 918806
Changes:
mailutils (1:3.5-3) unstable; urgency=medium
.
* Set gbp's debian-branch to buster.
* Cherry-pick patch from upstream git to avoid discarding stdin when
mail is used to send email with attachments (closes: #918806).
Checksums-Sha1:
a3a25b60987eeba74b426029b0e01e442e5c0a9b 3087 mailutils_3.5-3.dsc
86bd77c19a7f756fb7b650d7c177cab2c07d88dd 29464 mailutils_3.5-3.debian.tar.xz
175cba3ddf3c705345a0427f581f4615f6de6186 7818 mailutils_3.5-3_source.buildinfo
Checksums-Sha256:
644a984026b04b48129b4257ecd54bd8832d4fbee2e5fe04193982287bfdef0f 3087 mailutils_3.5-3.dsc
4758145e63b8d07d5553840dd89da172dadebd6e5e066e6677a71f6e43acc6d9 29464 mailutils_3.5-3.debian.tar.xz
aaf7593d9a315c0c315e871d6f9a07c5f87745c705b860da17e2ace26d9bdeeb 7818 mailutils_3.5-3_source.buildinfo
Files:
4a850fbf3480e6761678ea2f43c9b4e1 3087 mail optional mailutils_3.5-3.dsc
1bcff1540f1ce1641024fc100b75832e 29464 mail optional mailutils_3.5-3.debian.tar.xz
0befb6767972a2d94aca62f0763f4ebe 7818 mail optional mailutils_3.5-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEE6BdUhsApKYN8KGoWJVAvb8vjywQFAlyKFDkRHGpvcmRpQGRl
Ymlhbi5vcmcACgkQJVAvb8vjywRI2xAArhd56wBvi2tkaMfOhrxPOTldHoVj+h6E
xw96dCJ8N02TkUDkJEyZFhjGUgvD117AOalehzJK2fIA2QAkzgw6GCgtYCjTKoSr
zWtd3PcSq3mcnD5UvF7VCZLR4AxzJrASwpMbvdV/QNc0NCefNDz4f2lcKSAhdEY5
15m8Mve5D3VPYFoEcTnzKTq9eSwx/pGIQ6OHA1S0AbpRV7Ir/mXF1ruT+EESR5Ap
nZvhHY7G6LjDMkIgtqzg6G7x2XBgi0VSANy/W0IU1CdFZhI1sP7s6KFx1wFQ8hLG
8LdxKwuzW8em/oiSrTcOvO9XspCSCy3IOS/bxSwOF+U9qQH13eXgHEUM1K6yWS6y
dy1RMWBGTXORrKktcHjZWWW+MVVpUkwCnzgG9GNSuITTSphfTwC3as6ddOTfROcT
ONkOiB6o+7nl0PRpKYM1EBeHWSe7Kv8PHyytMDYmWwPLebrZ6lM3M2GOwS2K8UCJ
78cFov0feaR8oE4hSPsrC9QdcN1kMwXxwu7kI/bluvoKcAGin91RQzLt/H1v6IGC
xC8FsRA3amqn0DrnI79ggfXIjB6ru1dNH6cqXaWFHO9FkOyRB4SOfY016KwC1zAV
FzWMOZXMyShwB+wOBNZElypjxLVs3hdhd3C7QNVaEAeKlVthoOyZLGeo67KoF/Ii
McWEPINQIAI=
=dC0I
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 18 Apr 2019 07:25:44 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Dec 23 09:20:25 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.