public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative
@ 2023-02-20 16:30 Adolf Belka
  2023-02-20 16:30 ` [PATCH 2/2] wio-lib.pl: " Adolf Belka
  2023-02-20 17:08 ` [PATCH 1/2] mail.cgi: " Bernhard Bitsch
  0 siblings, 2 replies; 3+ messages in thread
From: Adolf Belka @ 2023-02-20 16:30 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

- 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(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 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(a)other.com, some(a)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;
 }
 
-- 
2.39.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-20 17:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 16:30 [PATCH 1/2] mail.cgi: Fixes bug#13040 - Change multipart/mixed to multipart/alternative Adolf Belka
2023-02-20 16:30 ` [PATCH 2/2] wio-lib.pl: " Adolf Belka
2023-02-20 17:08 ` [PATCH 1/2] mail.cgi: " Bernhard Bitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox