+} elsif ($subject =~ /^(VERBOSE )?INDEX (.*)$/i) {
+ my (@indexdata, $command);
+
+ $command = "index";
+ if (defined($1)) {
+ $command = "vindex";
+ }
+
+ open3(\*INDEXIN, \*INDEXOUT, \*INDEXERR,
+ $config{'pks_bin_dir'}."/onak", $command, "$2");
+ close INDEXIN;
+ @indexdata = <INDEXOUT>;
+ close INDEXOUT;
+ close INDEXERR;
+
+ open(MAIL, "|$config{mta}");
+ print MAIL "From: $config{adminemail}\n";
+ print MAIL "To: $replyto\n";
+ print MAIL "Subject: Reply to INDEX $2\n";
+ print MAIL "Precedence: list\n";
+ print MAIL "MIME-Version: 1.0\n";
+ print MAIL "Content-Type: text/plain\n";
+ print MAIL "\n";
+ print MAIL "Below follows the reply to your recent keyserver query:\n";
+ print MAIL "\n";
+ print MAIL @indexdata;
+ close MAIL;