mailutils mailx sets "Content-Disposition: attachment" for attachment

Viewed 180

I am using mailx to send regular e-mails. They have one attachment and a plain-text body.

I am doing this like so:

echo "Here is the data!" | mail -s "Your weekly report" -a "Content-Type: text/plain\; charset=\"utf-8\"" -a "From: Your beloved server <server@mail.tld>" -A /tmp/data.csv myadmin@mail.tld

It used to work fine under Debian Stretch. The body was MIME-encoded like this:

Content-ID: <yadayadayada@blablabla.tld>
Content-Type: text/plain
Content-Type: text/plain\; charset="utf-8"

Here is the data!

I recently upgraded to Debian Buster (mailx 3.5) and now, mailx wrongly adds

Content-Disposition: attachment to that part.

I looked through the documentation and did not find any hint of how to circumvent that or that the variant I use is wrong.

There is actually already a bug report related to that: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940249

But it is open and untouched since September 2019.

Does anyone know of a workaround?

1 Answers
Related