mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Jelle de Jong

Hello everybody,

I upgraded Debian squeeze to buster and changed our mailutils version 
and the mailing scripts I have for some automation stopped working.


I can not get Content-Disposition set to inline for the text/plain part.

I want to have an mail with a plain/text message shown inline (not as 
attachment) and an PDF file as attachment.


We are using Mozilla Thunderbird 78.11.0-1~deb10u1 as mail client for 
showing the messages.


The first example is what I used to have that used to work, but it does 
not show the text any-more because it sets the Content-Disposition to 
attachment.. for the plain/text.


EMAIL=jelledej...@powercraft.nl
NAMEWITHHOUSENUMBER=1234AB1
LASTNAME="de Jong"
CONTENT="Geachte heer en/of mevrouw $LASTNAME,\n\nHartelijk dank voor uw 
aanvraag voor organization-advies.\n"



echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# wrong for plain test part...
# Content-Type: application/octet-stream
# Content-Disposition: attachment
# Content-Transfer-Encoding: 8bit
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a 
"From: organization B.V. " "$EMAIL"


# creates a three part message all with the wrong Content-Disposition: 
attachment
emily:~# echo -e "$CONTENT" | mail.mailutils 
--subject="organization-advies: ($NAMEWITHHOUSENUMBER)" 
--content-type=text/plain --attach-fd=0 
--content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# Segmentation fault
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a 
"From: organization B.V. " "$EMAIL" --alternative


What to do to create my plain/text incline message with attached pdf 
document?


Kind regards,

Jelle de Jong



Re: mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Sergey Poznyakoff
Jelle de Jong  ha escrit:

> What to do to create my plain/text incline message with attached pdf
> document?

Add a final --content-type=text/plain option:

 echo -e "$CONTENT" | \
   mail.mailutils  -s "organization-advies: ($NAMEWITHHOUSENUMBER)" \
-A /root/organization-flyer.pdf \
-a "BCC: jelledej...@powercraft.nl" \
-a "From: organization B.V. " \
--content-type=text/plain \
"$EMAIL"

See https://mailutils.org/manual/html_section/mail.html#MIME for
explanation.

Best regards,
Sergey



Re: mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Jelle de Jong

Hello everybody,

When trying the following it uses Content-Disposition: attachment 
instead of Content-Disposition: inline for the text/plain.


echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL" --content-type=text/plain


--507007833-1625841480=:32424
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
Content-ID: <20210709163800.3242...@emily.organization.com>

Geachte heer en/of mevrouw de Jong,

Hartelijk dank voor uw aanvraag voor organization-advies.


--507007833-1625841480=:32424
Content-Type: application/octet-stream; name="organization-flyer.pdf"
Content-Disposition: attachment; filename="/root/organization-flyer.pdf"
Content-Transfer-Encoding: base64
Content-ID: <20210709163800.3242...@emily.organization.com>

I tried setting -a "Content-Disposition: inline"  or 
--content-filename=inline but both are not accepted as options.


I can not get the plain/text to show inline in the message, now it will 
show as an attached part file and the body is empty in thunderbird and 
roundcube.


I am trying to solve this quickly as the automation is not working any 
more and I don't seem to be able to downgrade mail.mailutils to stretch 
or upgrade to bullseye without creating a mess with loads of package 
dependencies.


Kind regards,

Jelle de Jong



On 7/9/21 3:50 PM, Jelle de Jong wrote:

Hello everybody,

I upgraded Debian squeeze to buster and changed our mailutils version 
and the mailing scripts I have for some automation stopped working.


I can not get Content-Disposition set to inline for the text/plain part.

I want to have an mail with a plain/text message shown inline (not as 
attachment) and an PDF file as attachment.


We are using Mozilla Thunderbird 78.11.0-1~deb10u1 as mail client for 
showing the messages.


The first example is what I used to have that used to work, but it does 
not show the text any-more because it sets the Content-Disposition to 
attachment.. for the plain/text.


EMAIL=jelledej...@powercraft.nl
NAMEWITHHOUSENUMBER=1234AB1
LASTNAME="de Jong"
CONTENT="Geachte heer en/of mevrouw $LASTNAME,\n\nHartelijk dank voor uw 
aanvraag voor organization-advies.\n"



echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# wrong for plain test part...
# Content-Type: application/octet-stream
# Content-Disposition: attachment
# Content-Transfer-Encoding: 8bit
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a 
"From: organization B.V. " "$EMAIL"


# creates a three part message all with the wrong Content-Disposition: 
attachment
emily:~# echo -e "$CONTENT" | mail.mailutils 
--subject="organization-advies: ($NAMEWITHHOUSENUMBER)" 
--content-type=text/plain --attach-fd=0 
--content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# Segmentation fault
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" -a 
"From: organization B.V. " "$EMAIL" --alternative


What to do to create my plain/text incline message with attached pdf 
document?


Kind regards,

Jelle de Jong





Re: mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Jelle de Jong

Hello everybody,

How do I generate an attachment with the following properties:

Content-Type: text/plain; charset=UTF-8;

Content-Disposition: inline;

Content-Transfer-Encoding: quoted-printable

So without name="" added to Content-Type or filename="" to 
Content-Disposition?


I am struggling to generate a plain/text mail with an attachment that do 
not have the Content-Disposition: or have Content-Disposition: inline;


This is either a regression or I am missing something.

Kind regards,

Jelle de Jong

On 7/9/21 4:44 PM, Jelle de Jong wrote:

Hello everybody,

When trying the following it uses Content-Disposition: attachment 
instead of Content-Disposition: inline for the text/plain.


echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL" --content-type=text/plain


--507007833-1625841480=:32424
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
Content-ID: <20210709163800.3242...@emily.organization.com>

Geachte heer en/of mevrouw de Jong,

Hartelijk dank voor uw aanvraag voor organization-advies.


--507007833-1625841480=:32424
Content-Type: application/octet-stream; name="organization-flyer.pdf"
Content-Disposition: attachment; filename="/root/organization-flyer.pdf"
Content-Transfer-Encoding: base64
Content-ID: <20210709163800.3242...@emily.organization.com>

I tried setting -a "Content-Disposition: inline"  or 
--content-filename=inline but both are not accepted as options.


I can not get the plain/text to show inline in the message, now it will 
show as an attached part file and the body is empty in thunderbird and 
roundcube.


I am trying to solve this quickly as the automation is not working any 
more and I don't seem to be able to downgrade mail.mailutils to stretch 
or upgrade to bullseye without creating a mess with loads of package 
dependencies.


Kind regards,

Jelle de Jong



On 7/9/21 3:50 PM, Jelle de Jong wrote:

Hello everybody,

I upgraded Debian squeeze to buster and changed our mailutils version 
and the mailing scripts I have for some automation stopped working.


I can not get Content-Disposition set to inline for the text/plain part.

I want to have an mail with a plain/text message shown inline (not as 
attachment) and an PDF file as attachment.


We are using Mozilla Thunderbird 78.11.0-1~deb10u1 as mail client for 
showing the messages.


The first example is what I used to have that used to work, but it 
does not show the text any-more because it sets the 
Content-Disposition to attachment.. for the plain/text.


EMAIL=jelledej...@powercraft.nl
NAMEWITHHOUSENUMBER=1234AB1
LASTNAME="de Jong"
CONTENT="Geachte heer en/of mevrouw $LASTNAME,\n\nHartelijk dank voor 
uw aanvraag voor organization-advies.\n"



echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# wrong for plain test part...
# Content-Type: application/octet-stream
# Content-Disposition: attachment
# Content-Transfer-Encoding: 8bit
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" 
-a "From: organization B.V. " "$EMAIL"


# creates a three part message all with the wrong Content-Disposition: 
attachment
emily:~# echo -e "$CONTENT" | mail.mailutils 
--subject="organization-advies: ($NAMEWITHHOUSENUMBER)" 
--content-type=text/plain --attach-fd=0 
--content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# Segmentation fault
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" 
-a "From: organization B.V. " "$EMAIL" 
--alternative


What to do to create my plain/text incline message with attached pdf 
document?


Kind regards,

Jelle de Jong







Re: mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Jelle de Jong

Hello everybody,

https://datatracker.ietf.org/doc/html/rfc2183#section-2.1

Please see the above RFC about the diffrence between 
Content-Disposition: inline and Content-Disposition: attachment


Either the Content-Disposition: should be removed so the MUA can decide 
or it should be set to inline so the content can be displayed.


The bellow command generates a almost correct message but only the 
Content-Disposition is wrong for the text/plain mime part.


echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/pdf --encoding=base64 
--content-filename=organization-flyer.pdf 
--attach=/root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL" --encoding=8bit 
--content-type=text/plain --skip-empty-attachments


Is there a way to set the Content-Disposition or is there a way to feed 
the message through sed and replace the Content-Disposition string and 
then sent out the message?


Kind regards,

Jelle de Jong

On 7/9/21 10:53 PM, Jelle de Jong wrote:

Hello everybody,

How do I generate an attachment with the following properties:

Content-Type: text/plain; charset=UTF-8;

Content-Disposition: inline;

Content-Transfer-Encoding: quoted-printable

So without name="" added to Content-Type or filename="" to 
Content-Disposition?


I am struggling to generate a plain/text mail with an attachment that do 
not have the Content-Disposition: or have Content-Disposition: inline;


This is either a regression or I am missing something.

Kind regards,

Jelle de Jong

On 7/9/21 4:44 PM, Jelle de Jong wrote:

Hello everybody,

When trying the following it uses Content-Disposition: attachment 
instead of Content-Disposition: inline for the text/plain.


echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL" --content-type=text/plain


--507007833-1625841480=:32424
Content-Type: text/plain; charset=UTF-8
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit
Content-ID: <20210709163800.3242...@emily.organization.com>

Geachte heer en/of mevrouw de Jong,

Hartelijk dank voor uw aanvraag voor organization-advies.


--507007833-1625841480=:32424
Content-Type: application/octet-stream; name="organization-flyer.pdf"
Content-Disposition: attachment; filename="/root/organization-flyer.pdf"
Content-Transfer-Encoding: base64
Content-ID: <20210709163800.3242...@emily.organization.com>

I tried setting -a "Content-Disposition: inline"  or 
--content-filename=inline but both are not accepted as options.


I can not get the plain/text to show inline in the message, now it 
will show as an attached part file and the body is empty in 
thunderbird and roundcube.


I am trying to solve this quickly as the automation is not working any 
more and I don't seem to be able to downgrade mail.mailutils to 
stretch or upgrade to bullseye without creating a mess with loads of 
package dependencies.


Kind regards,

Jelle de Jong



On 7/9/21 3:50 PM, Jelle de Jong wrote:

Hello everybody,

I upgraded Debian squeeze to buster and changed our mailutils version 
and the mailing scripts I have for some automation stopped working.


I can not get Content-Disposition set to inline for the text/plain part.

I want to have an mail with a plain/text message shown inline (not as 
attachment) and an PDF file as attachment.


We are using Mozilla Thunderbird 78.11.0-1~deb10u1 as mail client for 
showing the messages.


The first example is what I used to have that used to work, but it 
does not show the text any-more because it sets the 
Content-Disposition to attachment.. for the plain/text.


EMAIL=jelledej...@powercraft.nl
NAMEWITHHOUSENUMBER=1234AB1
LASTNAME="de Jong"
CONTENT="Geachte heer en/of mevrouw $LASTNAME,\n\nHartelijk dank voor 
uw aanvraag voor organization-advies.\n"



echo -e "$CONTENT" | mail.mailutils  -s "organization-advies: 
($NAMEWITHHOUSENUMBER)" -A /root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.V. 
" "$EMAIL"


# wrong for plain test part...
# Content-Type: application/octet-stream
# Content-Disposition: attachment
# Content-Transfer-Encoding: 8bit
echo -e "$CONTENT" | mail.mailutils --subject="organization-advies: 
($NAMEWITHHOUSENUMBER)" --content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/Helmwijk-flyer.pdf -a "BCC: jelledej...@powercraft.nl" 
-a "From: organization B.V. " "$EMAIL"


# creates a three part message all with the wrong 
Content-Disposition: attachment
emily:~# echo -e "$CONTENT" | mail.mailutils 
--subject="organization-advies: ($NAMEWITHHOUSENUMBER)" 
--content-type=text/plain --attach-fd=0 
--content-type=application/octet-stream 
--content-filename=organization-flyer.pdf 
--attach=/root/organization-flyer.pdf -a "BCC: 
jelledej...@powercraft.nl" -a "From: organization B.

Re: mailutils 3.5-4 in debian buster not working with as expected anymore

2021-07-09 Thread Sergey Poznyakoff
Jelle de Jong  ha escrit:

> When trying the following it uses Content-Disposition: attachment
> instead of Content-Disposition: inline for the text/plain.

You will have to upgrade to mailutils 3.12.  It does so by default for
message body[1].

Best regards,
Sergey

[1] http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=3a15565050