]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 20 Feb 2023 16:30:01 +0000 (17:30 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 4 Mar 2023 14:05:42 +0000 (14:05 +0000)
- Thunderbird and Roundcube mail clients presume that any mail with Content Type of
   multipart/mixed has an attachment included rather than actually checking for
   disposition attachment. This means that any mail with multipart/mixed gets the
   attachment icon marked up even though there is no attachment.
- Although this is a problem of the clients involved, in this case the simplest solution
   is to change multipart/mixed to multipart/alternative as the Mail Service test mail only
   sends text without any attachment or other part.
- Confirmed on my vm testbed

Fixes: Bug#13040
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
html/cgi-bin/mail.cgi

index 34f52ae01539ad4dbee460673ba380e5a9244048..0ed3dfeca9123abd01ad0d9425972276921002e7 100644 (file)
@@ -297,7 +297,7 @@ sub testmail {
                To              => $mail{'RECIPIENT'},
                #Cc             => 'some@other.com, some@more.com',
                Subject => 'IPFire Testmail',
-               Type    => 'multipart/mixed'
+               Type    => 'multipart/alternative'
        );
 
        ### Add parts (each "attach" has same arguments as "new"):
@@ -306,15 +306,6 @@ sub testmail {
                Data    => "This is the IPFire test mail."
        );
 
-       ### Add attachment for testing
-       #$msg->attach(
-       #       Type     => 'application/txt',
-       #       Encoding => 'base64',
-       #       Path     => '/var/ipfire/dma/dma.conf',
-       #       Filename => 'dma.conf',
-       #       Disposition => 'attachment'
-       #);
-
        $msg->send_by_sendmail;
 }