|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/libexec/webmin/qmailadmin/ |
Upload File : |
#!/usr/bin/perl
# delete_queue.cgi
# Delete a mail messsage from the queue
require './qmail-lib.pl';
&ReadParse();
-r $in{'file'} || &error($text{'delete_egone'});
$in{'file'} =~ /(\d+)\/(\d+)$/ || &error($text{'delete_ebogus'});
$id = "$1/$2";
($pid) = &find_byname("qmail-send");
if ($pid) {
&stop_qmail();
}
unlink("$qmail_mess_dir/$id");
unlink("$qmail_info_dir/$id");
unlink("$qmail_remote_dir/$id");
unlink("$qmail_local_dir/$id");
($newpid) = &find_byname("qmail-send");
if ($pid && !$newpid) {
# Need to re-start qmail
&start_qmail();
}
&redirect("list_queue.cgi");