// creation date: // printf("\nNSSDropbox Cleanup of zendto for preference file:\n %s\n\n", $argv[1]); printf("Gathering dropoffs with creation timestamps before: %s\n", timestampForTime(time() - $theDropbox->retainDays() * 24 * 60 * 60)); $oldDropoffs = NSSDropoff::dropoffsOutsideRetentionTime($theDropbox); if ($oldDropoffs && ($iMax = count($oldDropoffs))) { $i = 0; while ($i < $iMax) { printf("- Removing [%s] %s <%s>\n", $oldDropoffs[$i]->claimID(), $oldDropoffs[$i]->senderName(), $oldDropoffs[$i]->senderEmail()); $oldDropoffs[$i]->removeDropoff(); $i++; } } else { print "No dropoffs have expired.\n\n"; } // // Do a orphan purge, too: // printf("Purging orphaned dropoffs:\n"); NSSDropoff::cleanupOrphans($theDropbox); // // Now prune the auth table of old keys // printf("Purging old sender verification data:\n"); $theDropbox->PruneAuthData(); // // Now prune the req table of old keys // printf("Purging old request data:\n"); $theDropbox->PruneReqData(); }