Hi, I'd like to report what I believe is bug in mailutils.
For some time I've had a camera system that emails me an image file. The
basic setup is a script that calls something like:
echo Motion detected - see http://cam1.example.com/camera | mail -s Test
-A image.jpg -r "[email protected]" [email protected]
This sends an image from the camera along with a brief message which
includes a link to the camera. This used to work fine; recently,
however, after upgrading Linux versions the text of the message doesn't
show up in the email.
**What used to happen*:* when I view the raw text of an old message from
back when it used to work correctly, the message looks something like this:
---------------------------------------------------------------------------------------------------------------
--2006454085-1551307724=:11737 Content-ID: <20190227164844.11737@cam1>
Content-Type: text/plain Motion detected - see
http://cam1.example.com/camera --2006454085-1551307724=:11737
Content-ID: <20190227164844.11737.1@cam1> Content-Type:
application/octet-stream; name=image.jpg Content-Transfer-Encoding:
base64 Content-Disposition: attachment; filename=image.jpg
/9j/4QDeRXhpZgAATU0AKgAAAAgACAEAAAQAAAABAAAEAAEBAAQAAAABAAACQAEQAAIAAAAJAAAA
bgEaAAUAAAABAAAAeAEbAAUAAAABAAAAgAEoAAMAAAABAAIAAAITAAMAAAABAAEAAIdpAAQAAAAB
AAAAiAAAAABCcm9hZGNvbQAA ...
---------------------------------------------------------------------------------------------------------------
**What happens now*: *when I view the raw text of the message, I see
something like this:
---------------------------------------------------------------------------------------------------------------
--2027169656-1581016592=:11969 Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit Content-ID:
<20200206131632.11969.1@cam1> Motion detected - see
http://cam1.example.com/camera --2027169656-1581016592=:11969
Content-Type: application/octet-stream; name="image.jpg"
Content-Disposition: attachment; filename="/var/www/html/image.jpg"
Content-Transfer-Encoding: base64 Content-ID:
<20200206131632.11969.1@cam1>
/9j/4QDeRXhpZgAATU0AKgAAAAgACAEAAAQAAAABAAAEAAEBAAQAAAABAAADAAEQAAIAAAAJAAAA
bgEaAAUAAAABAAAAeAEbAAUAAAABAAAAgAEoAAMAAAABAAIAAAITAAMAAAABAAEAAIdpAAQAAAAB
AAAAiAAAAABCcm9hZGNvbQA ...
---------------------------------------------------------------------------------------------------------------
I think the line that I've highlighted in red above (3rd line -
"Content-Disposition: attachment") is the problem. when I manually
remove that line from the stored email on my server, everything appears
correctly.
*When this started:* I think this may have changed in MailUtils 3.3. It
was definitely working in Mailutils 3.1.1, but it does not work in the
version that's in the current Raspbian Buster repository (which is
Mailutils 3.5). I downloaded and compiled Mailutils 3.8, and it doesn't
work right there either. I also tried 3.4 and 3.3 (didn't work) as well
as 3.2 (did work).
I'm using Thunderbird as my mail reader. Other readers may handle this
differently (in particular, Gmail seems to work around the problem).
Thanks - let me know if I'm doing something wrong or if I can provide
more information.
ras