-&open_execute_command(MAILQ, $config{'mailq_cmd'}, 1, 1);
-while(<MAILQ>) {
- next if (/^(\S+)\s+is\s+empty/i || /^\s+Total\s+requests:/i);
- if (/^([^\s\*\!]+)[\*\!]?\s*(\d+)\s+(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+)\s+(.*)/) {
+local $out = &backquote_command("$config{'mailq_cmd'} 2>&1 </dev/null");
+&error("$config{'mailq_cmd'} failed : ".&html_escape($out)) if ($? && $throw);
+foreach my $l (split(/\r?\n/, $out)) {
+ next if ($l =~ /^(\S+)\s+is\s+empty/i ||
+ $l =~ /^\s+Total\s+requests:/i);
+ if ($l =~ /^([^\s\*\!]+)[\*\!]?\s*(\d+)\s+(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+)\s+(.*)/) {