⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view_mailq.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# view_mailq.cgi# Display some message from the mail queuerequire './sendmail-lib.pl';require './boxes-lib.pl';&ReadParse();$access{'mailq'} || &error($text{'mailq_ecannot'});$in{'file'} =~ /\.\./ && &error($text{'mailq_ecannot'});$qfile = $in{'file'};($dfile = $qfile) =~ s/^qf/df/;$mqueue = &mailq_dir(&get_sendmailcf());$mail = &mail_from_queue("$mqueue/$qfile", "$mqueue/$dfile");&parse_mail($mail);&header($text{'view_title'}, "");print "<center><font size=+1>",&text('view_qdesc', "<tt>$qfile</tt>"),      "</font></center>\n";print "<hr>\n";print "<form action=del_mailq.cgi>\n";print "<input type=hidden name=file value='$in{'file'}'>\n";print "<table width=100% border=1>\n";print "<tr> <td $tb><b>$text{'view_headers'}</b></td> </tr>\n";print "<tr> <td $cb><table width=100%>\n";print "<tr> <td><b>$text{'mail_from'}</b></td> ",      "<td>",&html_escape($mail->{'header'}->{'from'}),"</td> </tr>\n";print "<tr> <td><b>$text{'mail_to'}</b></td> ",      "<td>",&html_escape($mail->{'header'}->{'to'}),"</td> </tr>\n";print "<tr> <td><b>$text{'mail_cc'}</b></td> ",      "<td>",&html_escape($mail->{'header'}->{'cc'}),"</td> </tr>\n"	if ($mail->{'header'}->{'cc'});print "<tr> <td><b>$text{'mail_date'}</b></td> ",      "<td>",&html_escape($mail->{'header'}->{'date'}),"</td> </tr>\n";print "<tr> <td><b>$text{'mail_subject'}</b></td> ",      "<td>",&html_escape($mail->{'header'}->{'subject'}),"</td> </tr>\n";print "</table></td></tr></table><p>\n";# Find body attachment@attach = @{$mail->{'attach'}};foreach $a (@attach) {	if ($a->{'type'} eq 'text/plain') {		$body = $a;		last;		}	}if ($body) {	print "<table width=100% border=1><tr><td $cb><pre>\n",	      &html_escape($body->{'data'}),"</pre></td></tr></table><p>\n";	}# Display other attachments@attach = grep { $_ ne $body } @attach;if (@attach) {	print "<table width=100% border=1>\n";	print "<tr> <td $tb><b>$text{'view_attach'}</b></td> </tr>\n";	print "<tr> <td $cb>\n";	foreach $a (@attach) {		push(@titles, $a->{'filename'} ? $a->{'filename'}					       : $a->{'type'});		push(@links, "qdetach.cgi?file=$qfile&attach=$a->{'idx'}");		push(@icons, "images/boxes.gif");		}	&icons_table(\@links, \@titles, \@icons, 8);	print "</td></tr></table><p>\n";	}# Display buttonsprint "<input type=submit value='$text{'view_delete'}' name=delete>\n";print "</form>\n";print "<hr>\n";&footer("list_mailq.cgi", $text{'mailq_return'});

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -