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 <[email protected]>" -A /tmp/data.csv [email protected]
It used to work fine under Debian Stretch. The body was MIME-encoded like this:
Content-ID: <[email protected]>
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?
The bug itself has been solved with version 3.12: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940249#10
Sadly, the bug is apparently still unsolved, to the "solution" is to upgrade to a more recent Debian version.