3 # View one attachment from a queued message
5 require './postfix-lib.pl';
6 require './boxes-lib.pl';
8 $access{'mailq'} || &error($text{'mailq_ecannot'});
10 $mail = &parse_queue_file($in{'id'});
11 $mail || &error($text{'mailq_egone'});
13 $attach = $mail->{'attach'}->[$in{'attach'}];
15 print "X-no-links: 1\n";
16 if ($attach->{'type'} eq 'message/delivery-status') {
17 print "Content-type: text/plain\n\n";
20 print "Content-type: $attach->{'type'}\n\n";
22 if ($attach->{'type'} =~ /^text\/html/i) {
23 print &filter_javascript($attach->{'data'});
26 print $attach->{'data'};