From patchwork Mon Feb 20 16:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6563 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PL7F11Fwvz3x1v for ; Mon, 20 Feb 2023 16:30:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PL7Dy693qzqt; Mon, 20 Feb 2023 16:30:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PL7Dy52C0z2xxw; Mon, 20 Feb 2023 16:30:10 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PL7Dx2J4Fz2xHS for ; Mon, 20 Feb 2023 16:30:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PL7Dw3LsjzlG; Mon, 20 Feb 2023 16:30:08 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1676910608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LDofI3Qx6Z9VRVy6QB1RAZF90U8KH2mIvazEd9KoPkQ=; b=O5Rl5mfHc+47PioujcTdW2nPiQCuxEKi+SD5OT0+rMBnz6iWGNHLAyimEZ/b/oGhakWmHv 43JmmF2UYwP0j8DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1676910608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LDofI3Qx6Z9VRVy6QB1RAZF90U8KH2mIvazEd9KoPkQ=; b=IZd/YjuDkGbwF8L9tPELof93WUh3fHA9UOZqy8h0+LEBDuZyCFkfzxWtnyO3PgdMVw1guP M7yO6yiDlgkK6ZDfYx1HCwKovhqiGMdz6a9zBv555ZscIUrYWsTxD+VBQoxHfvBrtkbUjQ uOP+JzAtNFhyBDWJDAfMVytueQvIyTL288NYYAPIIuD6xEizvxPn1StONPLJzl/eQMuaaZ W2ffi028W6k7WEIkW6/xkWQrPxLdHoWzICK2YBqi2BGQapH7g6hOAJ+KHNHhLm02dJcwdJ NL75908m341t3zlc13IxSXXao+RY4ziXAug+UDc4o6NzHdMPt6KgUJUZVPRQQA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/2] mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative Date: Mon, 20 Feb 2023 17:30:01 +0100 Message-Id: <20230220163003.3434540-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - 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 Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch --- html/cgi-bin/mail.cgi | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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 => $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; }