Handle hostnames with upper-case letters
[webmin.git] / sendmail / flushq.cgi
1 #!/usr/local/bin/perl
2 # flushq.cgi
3 # Run sendmail -vq and display the output
4
5 require './sendmail-lib.pl';
6 $access{'flushq'} || &error($text{'flushq_ecannot'});
7 &ui_print_unbuffered_header(undef, $text{'flushq_title'}, "");
8 &ReadParse();
9
10 $qopt = $in{'quar'} ? "-qQ" : "-q";
11 $oopt = $config{'mailq_order'} ? "-O QueueSortOrder=$config{'mailq_order'}" :"";
12 $cmd = "$config{'sendmail_path'} -v $qopt $oopt -C$config{'sendmail_cf'}";
13 print &text('flushq_desc', "<tt>$cmd</tt>"),"\n";
14 print "<pre>";
15 &foreign_require("proc", "proc-lib.pl");
16 &foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0, STDOUT, undef, 1);
17 print "</pre>\n";
18 &webmin_log("flushq");
19
20 &ui_print_footer("list_mailq.cgi", $text{'mailq_return'});
21