Remove duplicate articles in outgoing dir.

This commit is contained in:
Retro_Guy 2024-01-17 11:12:59 -07:00
parent f0aa279319
commit 5d4991fc8b
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ function post_articles($ns, $spooldir)
fputs($ns, ".\r\n");
fclose($message_fp);
$response = line_read($ns);
if (strcmp(substr($response, 0, 7), "441 435") == 0) {
$removed = unlink($outgoing_dir . $message);
file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Response: " . $response, FILE_APPEND);
}
if (strcmp(substr($response, 0, 3), "240") == 0) {
$removed = unlink($outgoing_dir . $message);
file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Posted: " . $message . ": " . $response . " Removed: " . $removed, FILE_APPEND);