- if ($count > 0) {
- open(MAIL, "|$config{mta}");
- print MAIL "From: $config{adminemail}\n";
- print MAIL "To: ";
- foreach $i (@{$config{'syncsites'}}) {
- if (! defined($seenby{$i})) {
- print MAIL "$i";
- $count--;
- if ($count > 0) {
- print MAIL ", ";
+ if ($subject =~ /ADD/i) {
+ open(MAIL, "|$config{mta}");
+ print MAIL "From: $config{adminemail}\n";
+ print MAIL "To: $replyto\n";
+ print MAIL "Subject: Reply to ADD\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 "Thank you for your recent key submission.",
+ " It has been processed and synced\n",
+ "with ", $count, " other keyservers.\n";
+ close MAIL;
+ }
+
+ if ((! defined($newupdate[0])) || $newupdate[0] eq '') {
+ open (LOG, ">>$config{'logfile'}");
+ print LOG "[";
+ print LOG sprintf "%02d/%02d/%04d %02d:%02d:%02d",
+ $time[3], $time[4] + 1, $time[5] + 1900,
+ $time[2], $time[1], $time[0];
+ print LOG "] onak-mail[$$]: Nothing to sync.\n";
+ close LOG;
+ $count = 0;
+ }
+
+ if ($count > 0) {
+ open(MAIL, "|$config{mta}");
+ print MAIL "From: $config{adminemail}\n";
+ print MAIL "To: ";
+ foreach $i (@{$config{'syncsites'}}) {
+ if (! defined($seenby->{$i})) {
+ print MAIL "$i";
+ $count--;
+ if ($count > 0) {
+ print MAIL ", ";
+ }