INN commit: trunk (nnrpd/post.c scripts/innreport_inn.pm)

INN Commit Russ_Allbery at isc.org
Thu Feb 19 07:19:22 UTC 2009


    Date: Wednesday, February 18, 2009 @ 23:19:22
  Author: iulius
Revision: 8323

Increment the count of rejected posts when CLOSE is used
in filter_nnrpd.pl.
Also fix a few messages processed by innreport as for
postings when CLOSE/DROP/SPOOL are used.

Modified:
  trunk/nnrpd/post.c
  trunk/scripts/innreport_inn.pm

--------------------------+
 nnrpd/post.c             |    7 ++++---
 scripts/innreport_inn.pm |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c	2009-02-18 21:38:47 UTC (rev 8322)
+++ nnrpd/post.c	2009-02-19 07:19:22 UTC (rev 8323)
@@ -1038,13 +1038,13 @@
 		strlcpy(idbuff, HDR(HDR__MESSAGEID), SMBUF);
 	}
 	if (strncmp(p, "DROP", 4) == 0) {
-	    syslog(L_NOTICE, "%s post %s", Client.host, p);
+	    syslog(L_NOTICE, "%s post failed %s", Client.host, p);
 	    if (modgroup)
 		free(modgroup);
 	    return NULL;
 	}
 	else if (strncmp(p, "SPOOL", 5) == 0) {
-	    syslog(L_NOTICE, "%s post %s", Client.host, p);
+	    syslog(L_NOTICE, "%s post failed %s", Client.host, p);
 	    strlcpy(SDir, innconf->pathincoming, sizeof(SDir));
 	    if (modgroup) {
 		free(modgroup);
@@ -1057,9 +1057,10 @@
             }
 	}
         else if (strncmp(p, "CLOSE", 5) == 0) {
-            syslog(L_NOTICE, "%s post %s", Client.host, p);
+            syslog(L_NOTICE, "%s post failed %s", Client.host, p);
             Reply("%d NNTP server unavailable; no posting\r\n",
                   NNTP_FAIL_TERMINATING);
+            POSTrejected++;
             ExitWithStats(1, true);
         }
 	else

Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm	2009-02-18 21:38:47 UTC (rev 8322)
+++ scripts/innreport_inn.pm	2009-02-19 07:19:22 UTC (rev 8323)
@@ -1549,9 +1549,9 @@
       }
       return 1;
     }
-    # post failed
-    if ($left =~ /(\S+) post failed (.*)$/o) {
-      my ($cust, $error) = ($1, $2);
+    # post/ihave failed
+    if ($left =~ /(\S+) (post|ihave) failed (.*)$/o) {
+      my ($cust, $error) = ($1, $3);
       $nnrpd_post_error{$error}++;
       return 1;
     }




More information about the inn-committers mailing list