From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernhard Bitsch To: development@lists.ipfire.org Subject: Re: [PATCH 1/2] mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative Date: Mon, 20 Feb 2023 18:08:20 +0100 Message-ID: In-Reply-To: <20230220163003.3434540-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4228057926099204967==" List-Id: --===============4228057926099204967== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bernhard Bitsch Am 20.02.2023 um 17:30 schrieb Adolf Belka: > - Thunderbird and Roundcube mail clients presume that any mail with Content= Type of > multipart/mixed has an attachment included rather than actually checkin= g for > disposition attachment. This means that any mail with multipart/mixed g= ets the > attachment icon marked up even though there is no attachment. > - Although this is a problem of the clients involved, in this case the simp= lest solution > is to change multipart/mixed to multipart/alternative as the Mail Servi= ce test mail only > sends text without any attachment or other part. > - Confirmed on my vm testbed >=20 > Fixes: Bug#13040 > Tested-by: Adolf Belka > Signed-off-by: Adolf Belka > --- > html/cgi-bin/mail.cgi | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) >=20 > diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi > index 34f52ae01..0ed3dfeca 100644 > --- a/html/cgi-bin/mail.cgi > +++ b/html/cgi-bin/mail.cgi > @@ -297,7 +297,7 @@ sub testmail { > To =3D> $mail{'RECIPIENT'}, > #Cc =3D> 'some(a)other.com, some(a)more.com', > Subject =3D> 'IPFire Testmail', > - Type =3D> 'multipart/mixed' > + Type =3D> 'multipart/alternative' > ); > =20 > ### Add parts (each "attach" has same arguments as "new"): > @@ -306,15 +306,6 @@ sub testmail { > Data =3D> "This is the IPFire test mail." > ); > =20 > - ### Add attachment for testing > - #$msg->attach( > - # Type =3D> 'application/txt', > - # Encoding =3D> 'base64', > - # Path =3D> '/var/ipfire/dma/dma.conf', > - # Filename =3D> 'dma.conf', > - # Disposition =3D> 'attachment' > - #); > - > $msg->send_by_sendmail; > } > =20 --===============4228057926099204967==--