message/delivery-status attachments should be shown as text
authorJamie Cameron <jcameron@webmin.com>
Tue, 30 Jun 2009 21:31:45 +0000 (21:31 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 30 Jun 2009 21:31:45 +0000 (21:31 +0000)
postfix/detach_queue.cgi
sendmail/qdetach.cgi

index f358611..63839fc 100755 (executable)
@@ -13,7 +13,12 @@ $mail || &error($text{'mailq_egone'});
 $attach = $mail->{'attach'}->[$in{'attach'}];
 
 print "X-no-links: 1\n";
-print "Content-type: $attach->{'type'}\n\n";
+if ($attach->{'type'} eq 'message/delivery-status') {
+       print "Content-type: text/plain\n\n";
+       }
+else {
+       print "Content-type: $attach->{'type'}\n\n";
+       }
 if ($attach->{'type'} =~ /^text\/html/i) {
        print &filter_javascript($attach->{'data'});
        }
index 3fb61b0..61578a4 100755 (executable)
@@ -28,7 +28,12 @@ foreach $s (@sub) {
 $attach = $mail->{'attach'}->[$in{'attach'}];
 
 print "X-no-links: 1\n";
-print "Content-type: $attach->{'type'}\n\n";
+if ($attach->{'type'} eq 'message/delivery-status') {
+       print "Content-type: text/plain\n\n";
+       }
+else {
+       print "Content-type: $attach->{'type'}\n\n";
+       }
 if ($attach->{'type'} =~ /^text\/html/i) {
        print &filter_javascript($attach->{'data'});
        }