#!/usr/local/bin/perl
# flushq.cgi
# Run sendmail -vq and display the output

require './sendmail-lib.pl';
$| = 1;
$theme_no_table = 1;
&header($text{'flushq_title'}, "");
print "<hr><p>\n";

$cmd = "$config{'sendmail_path'} -v -q -C$config{'sendmail_cf'}";
print &text('flushq_desc', "<tt>$cmd</tt>"),"<br>\n";
print "<pre>";
&foreign_require("proc", "proc-lib.pl");
&foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0, STDOUT, undef, 1);
print "</pre>\n";
&webmin_log("flushq");

print "<hr>\n";
&footer("list_mailq.cgi", $text{'mailq_return'});

