INN commit: trunk (innd/art.c scripts/innreport_inn.pm)

INN Commit Russ_Allbery at isc.org
Wed Mar 18 20:19:25 UTC 2009


    Date: Wednesday, March 18, 2009 @ 13:19:25
  Author: iulius
Revision: 8387

Log right 439 response codes in <pathlog>/news when TAKETHIS
rejects a message (it is not 437 like IHAVE).

Modified:
  trunk/innd/art.c
  trunk/scripts/innreport_inn.pm

--------------------------+
 innd/art.c               |   99 ++++++++++++++++++++++++++++++---------------
 scripts/innreport_inn.pm |   72 ++++++++++++++++----------------
 2 files changed, 104 insertions(+), 67 deletions(-)

Modified: innd/art.c
===================================================================
--- innd/art.c	2009-03-18 20:14:48 UTC (rev 8386)
+++ innd/art.c	2009-03-18 20:19:25 UTC (rev 8387)
@@ -632,7 +632,11 @@
   const ARTHEADER *hp;
   char		c, *p, *colon;
   int		i;
+  bool          ihave;
 
+  /* Check whether we are receiving the article via IHAVE or TAKETHIS. */
+  ihave = (cp->Sendid.size > 3) ? false : true;
+
   /* If we've already found an error, don't parse any more headers. */
   if (*cp->Error != '\0')
     return;
@@ -643,7 +647,8 @@
       *p = '\0';
     snprintf(cp->Error, sizeof(cp->Error),
              "%d No colon-space in \"%s\" header",
-             NNTP_FAIL_IHAVE_REJECT, MaxLength(header, header));
+             ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+             MaxLength(header, header));
     if (p != NULL)
       *p = '\r';
     return;
@@ -669,7 +674,8 @@
 	*p = '\0';
 	snprintf(cp->Error, sizeof(cp->Error),
                  "%d Space before colon in \"%s\" header",
-                 NNTP_FAIL_IHAVE_REJECT, MaxLength(header, header));
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+                 MaxLength(header, header));
 	*p = c;
 	return;
       }
@@ -805,8 +811,13 @@
 ARTerror(CHANNEL *cp, const char *format, ...)
 {
     va_list args;
+    bool ihave;
+    
+    /* Check whether we are receiving the article via IHAVE or TAKETHIS. */
+    ihave = (cp->Sendid.size > 3) ? false : true;
 
-    snprintf(cp->Error, sizeof(cp->Error), "%d ", NNTP_FAIL_IHAVE_REJECT);
+    snprintf(cp->Error, sizeof(cp->Error), "%d ",
+             ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
     va_start(args, format);
     vsnprintf(cp->Error + 4, sizeof(cp->Error) - 4, format, args);
     va_end(args);
@@ -1009,7 +1020,7 @@
 **  Return true if the article has no error, or false which means the error.
 */
 static bool
-ARTclean(ARTDATA *data, char *buff)
+ARTclean(ARTDATA *data, char *buff, bool ihave)
 {
   HDRCONTENT	*hc = data->HdrContent;
   const ARTHEADER *hp = ARTheaders;
@@ -1034,10 +1045,12 @@
       if (HDR_FOUND(i))
         continue;
       if (hc[i].Length < 0) {
-        sprintf(buff, "%d Duplicate \"%s\" header", NNTP_FAIL_IHAVE_REJECT,
+        sprintf(buff, "%d Duplicate \"%s\" header",
+                ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                 hp[1].Name);
       } else {
-	sprintf(buff, "%d Missing \"%s\" header", NNTP_FAIL_IHAVE_REJECT,
+	sprintf(buff, "%d Missing \"%s\" header",
+                ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                 hp[i].Name);
       }
       TMRstop(TMR_ARTCLEAN);
@@ -1048,7 +1061,8 @@
   /* assumes Message-ID header is required header */
   if (!ARTidok(HDR(HDR__MESSAGE_ID))) {
     HDR_LEN(HDR__MESSAGE_ID) = 0;
-    sprintf(buff, "%d Bad \"Message-ID\" header", NNTP_FAIL_IHAVE_REJECT);
+    sprintf(buff, "%d Bad \"Message-ID\" header",
+            ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
     TMRstop(TMR_ARTCLEAN);
     return false;
   }
@@ -1057,7 +1071,8 @@
     p = HDR(HDR__LINES);
     i = data->Lines;
     if ((delta = i - atoi(p)) != 0 && abs(delta) > innconf->linecountfuzz) {
-      sprintf(buff, "%d Linecount %s != %d +- %ld", NNTP_FAIL_IHAVE_REJECT,
+      sprintf(buff, "%d Linecount %s != %d +- %ld",
+              ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
 	MaxLength(p, p), i, innconf->linecountfuzz);
       TMRstop(TMR_ARTCLEAN);
       return false;
@@ -1069,7 +1084,8 @@
   p = HDR(HDR__DATE);
   data->Posted = parsedate_rfc2822_lax(p);
   if (data->Posted == (time_t) -1) {
-    sprintf(buff, "%d Bad \"Date\" header -- \"%s\"", NNTP_FAIL_IHAVE_REJECT,
+    sprintf(buff, "%d Bad \"Date\" header -- \"%s\"",
+            ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
       MaxLength(p, p));
     TMRstop(TMR_ARTCLEAN);
     return false;
@@ -1078,7 +1094,8 @@
       long cutoff = innconf->artcutoff * 24 * 60 * 60;
 
       if (data->Posted < Now.tv_sec - cutoff) {
-          sprintf(buff, "%d Too old -- \"%s\"", NNTP_FAIL_IHAVE_REJECT,
+          sprintf(buff, "%d Too old -- \"%s\"",
+                  ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                   MaxLength(p, p));
           TMRstop(TMR_ARTCLEAN);
           return false;
@@ -1086,7 +1103,8 @@
   }
   if (data->Posted > Now.tv_sec + DATE_FUZZ) {
     sprintf(buff, "%d Article posted in the future -- \"%s\"",
-      NNTP_FAIL_IHAVE_REJECT, MaxLength(p, p));
+            ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+            MaxLength(p, p));
     TMRstop(TMR_ARTCLEAN);
     return false;
   }
@@ -1104,7 +1122,7 @@
     &data->Newsgroups)) == 0) {
     TMRstop(TMR_ARTCLEAN);
     sprintf(buff, "%d Unwanted character in \"Newsgroups\" header",
-      NNTP_FAIL_IHAVE_REJECT);
+            ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
     return false;
   }
 
@@ -1910,6 +1928,7 @@
   bool		OverviewCreated = false;
   bool		IsControl = false;
   bool		Filtered = false;
+  bool          ihave;
   struct buffer	*article;
   HASH		hash;
   TOKEN		token;
@@ -1919,9 +1938,12 @@
 #endif /* defined(DO_PERL) || defined(DO_PYTHON) */
   OVADDRESULT	result;
 
+  /* Check whether we are receiving the article via IHAVE or TAKETHIS. */
+  ihave = (cp->Sendid.size > 3) ? false : true;
+
   /* Preliminary clean-ups. */
   article = &cp->In;
-  artclean = ARTclean(data, cp->Error);
+  artclean = ARTclean(data, cp->Error, ihave);
 
   /* If we don't have Path or Message-ID, we can't continue. */
   if (!artclean && (!HDR_FOUND(HDR__PATH) || !HDR_FOUND(HDR__MESSAGE_ID))) {
@@ -1933,7 +1955,7 @@
   hopcount = ARTparsepath(HDR(HDR__PATH), HDR_LEN(HDR__PATH), &data->Path);
   if (hopcount == 0) {
     snprintf(cp->Error, sizeof(cp->Error), "%d illegal path element",
-            NNTP_FAIL_IHAVE_REJECT);
+             ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
     ARTreject(REJECT_OTHER, cp);
     return false;
   }
@@ -1953,7 +1975,8 @@
   hash = HashMessageID(HDR(HDR__MESSAGE_ID));
   data->Hash = &hash;
   if (HIScheck(History, HDR(HDR__MESSAGE_ID))) {
-    snprintf(cp->Error, sizeof(cp->Error), "%d Duplicate", NNTP_FAIL_IHAVE_REJECT);
+    snprintf(cp->Error, sizeof(cp->Error), "%d Duplicate",
+             ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
     ARTlog(data, ART_REJECT, cp->Error);
     ARTreject(REJECT_DUPLICATE, cp);
     return false;
@@ -1990,7 +2013,8 @@
   for(j = 0 ; ME.Exclusions && ME.Exclusions[j] ; j++) {
     if (ListHas((const char **)hops, (const char *)ME.Exclusions[j])) {
       snprintf(cp->Error, sizeof(cp->Error), "%d Unwanted site %s in path",
-	NNTP_FAIL_IHAVE_REJECT, MaxLength(ME.Exclusions[j], ME.Exclusions[j]));
+	       ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+               MaxLength(ME.Exclusions[j], ME.Exclusions[j]));
       ARTlog(data, ART_REJECT, cp->Error);
       if (innconf->remembertrash && (Mode == OMrunning) &&
 	  !InndHisRemember(HDR(HDR__MESSAGE_ID)))
@@ -2014,7 +2038,8 @@
     if (innconf->dontrejectfiltered) {
       Filtered = true;
     } else {
-      snprintf(cp->Error, sizeof(cp->Error), "%d %.200s", NNTP_FAIL_IHAVE_REJECT,
+      snprintf(cp->Error, sizeof(cp->Error), "%d %.200s",
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                filterrc);
       syslog(L_NOTICE, "rejecting[python] %s %s", HDR(HDR__MESSAGE_ID),
              cp->Error);
@@ -2040,7 +2065,8 @@
     if (innconf->dontrejectfiltered) {
       Filtered = true;
     } else {
-      snprintf(cp->Error, sizeof(cp->Error), "%d %.200s", NNTP_FAIL_IHAVE_REJECT,
+      snprintf(cp->Error, sizeof(cp->Error), "%d %.200s",
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                filterrc);
       syslog(L_NOTICE, "rejecting[perl] %s %s", HDR(HDR__MESSAGE_ID),
              cp->Error);
@@ -2059,7 +2085,7 @@
   if (HDR_FOUND(HDR__DISTRIBUTION)) {
     if (HDR(HDR__DISTRIBUTION)[0] == ',') {
       snprintf(cp->Error, sizeof(cp->Error), "%d bogus distribution \"%s\"",
-               NNTP_FAIL_IHAVE_REJECT,
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                MaxLength(HDR(HDR__DISTRIBUTION), HDR(HDR__DISTRIBUTION)));
       ARTlog(data, ART_REJECT, cp->Error);
       if (innconf->remembertrash && Mode == OMrunning &&
@@ -2074,7 +2100,8 @@
       if (ME.Distributions &&
 	!DISTwantany(ME.Distributions, data->Distribution.List)) {
 	snprintf(cp->Error, sizeof(cp->Error),
-                 "%d Unwanted distribution \"%s\"", NNTP_FAIL_IHAVE_REJECT,
+                 "%d Unwanted distribution \"%s\"",
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                  MaxLength(data->Distribution.List[0],
                            data->Distribution.List[0]));
 	ARTlog(data, ART_REJECT, cp->Error);
@@ -2206,7 +2233,8 @@
     /* Basic validity check. */
     if (ngp->Rest[0] == NF_FLAG_MODERATED && !Approved) {
       snprintf(cp->Error, sizeof(cp->Error), "%d Unapproved for \"%s\"",
-               NNTP_FAIL_IHAVE_REJECT, MaxLength(ngp->Name, ngp->Name));
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+               MaxLength(ngp->Name, ngp->Name));
       ARTlog(data, ART_REJECT, cp->Error);
       if (innconf->remembertrash && (Mode == OMrunning) &&
 	  !InndHisRemember(HDR(HDR__MESSAGE_ID)))
@@ -2232,7 +2260,8 @@
       continue;
     } else if (canpost < 0) {
       snprintf(cp->Error, sizeof(cp->Error),
-               "%d Won't accept posts in \"%s\"", NNTP_FAIL_IHAVE_REJECT,
+               "%d Won't accept posts in \"%s\"",
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                MaxLength(p, p));
       ARTlog(data, ART_REJECT, cp->Error);
       ARTreject(REJECT_GROUP, cp);
@@ -2299,11 +2328,13 @@
     if (!Accepted) {
       if (NoHistoryUpdate) {
 	snprintf(cp->Error, sizeof(cp->Error), "%d Can't post to \"%s\"",
-                NNTP_FAIL_IHAVE_REJECT, MaxLength(data->Newsgroups.List[0],
-                                             data->Newsgroups.List[0]));
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+                 MaxLength(data->Newsgroups.List[0],
+                           data->Newsgroups.List[0]));
       } else {
         snprintf(cp->Error, sizeof(cp->Error),
-                 "%d Unwanted newsgroup \"%s\"", NNTP_FAIL_IHAVE_REJECT,
+                 "%d Unwanted newsgroup \"%s\"",
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                  MaxLength(data->Newsgroups.List[0],
                            data->Newsgroups.List[0]));
       }
@@ -2351,12 +2382,12 @@
       if (HDR_FOUND(HDR__XREF)) {
 	snprintf(cp->Error, sizeof(cp->Error),
                  "%d Xref header \"%s\" invalid in xrefslave mode",
-                 NNTP_FAIL_IHAVE_REJECT,
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
                  MaxLength(HDR(HDR__XREF), HDR(HDR__XREF)));
       } else {
 	snprintf(cp->Error, sizeof(cp->Error),
                  "%d Xref header required in xrefslave mode",
-                 NNTP_FAIL_IHAVE_REJECT);
+                 ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT);
       }
       ARTlog(data, ART_REJECT, cp->Error);
       ARTreject(REJECT_OTHER, cp);
@@ -2384,7 +2415,7 @@
   if (token.type == TOKEN_EMPTY) {
     syslog(L_ERROR, "%s cant store article: %s", LogName, SMerrorstr);
     snprintf(cp->Error, sizeof(cp->Error), "%d cant store article",
-             NNTP_FAIL_IHAVE_DEFER);
+             ihave ? NNTP_FAIL_IHAVE_DEFER : NNTP_FAIL_ACTION);
     ARTlog(data, ART_REJECT, cp->Error);
     if ((Mode == OMrunning) && !InndHisRemember(HDR(HDR__MESSAGE_ID)))
       syslog(L_ERROR, "%s cant write history %s %m", LogName,
@@ -2426,7 +2457,8 @@
     syslog(L_ERROR, "%s cant write history %s %m", LogName,
       HDR(HDR__MESSAGE_ID));
     snprintf(cp->Error, sizeof(cp->Error), "%d cant write history, %s",
-             NNTP_FAIL_IHAVE_DEFER, strerror(errno));
+             ihave ? NNTP_FAIL_IHAVE_DEFER : NNTP_FAIL_ACTION,
+             strerror(errno));
     ARTlog(data, ART_REJECT, cp->Error);
     ARTreject(REJECT_OTHER, cp);
     return false;
@@ -2440,15 +2472,18 @@
     if (data->CRwithoutLF > 0 && data->LFwithoutCR == 0)
       snprintf(cp->Error, sizeof(cp->Error),
                "%d article includes CR without LF(%d)",
-               NNTP_FAIL_IHAVE_REJECT, data->CRwithoutLF);
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+               data->CRwithoutLF);
     else if (data->CRwithoutLF == 0 && data->LFwithoutCR > 0)
       snprintf(cp->Error, sizeof(cp->Error),
                "%d article includes LF without CR(%d)",
-               NNTP_FAIL_IHAVE_REJECT, data->LFwithoutCR);
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+               data->LFwithoutCR);
     else
       snprintf(cp->Error, sizeof(cp->Error),
                "%d article includes CR without LF(%d) and LF withtout CR(%d)",
-               NNTP_FAIL_IHAVE_REJECT, data->CRwithoutLF, data->LFwithoutCR);
+               ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
+               data->CRwithoutLF, data->LFwithoutCR);
     ARTlog(data, ART_STRSTR, cp->Error);
   }
   ARTlog(data, Accepted ? ART_ACCEPT : ART_JUNK, (char *)NULL);

Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm	2009-03-18 20:14:48 UTC (rev 8386)
+++ scripts/innreport_inn.pm	2009-03-18 20:19:25 UTC (rev 8387)
@@ -351,7 +351,7 @@
     }
 
     # 437 Duplicate article
-    if ($left =~ /(\S+) <[^>]+> 437 Duplicate(?: article)?$/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Duplicate(?: article)?$/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -359,7 +359,7 @@
       return 1;
     }
     # 437 Unapproved for
-    if ($left =~ /(\S+) <[^>]+> 437 Unapproved for \"([^\"]+)\"$/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Unapproved for \"([^\"]+)\"$/o) {
       my ($server, $group) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -368,7 +368,7 @@
       return 1;
     }
     # 437 Too old -- ...
-    if ($left =~ /(\S+) <[^>]+> 437 Too old -- /o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Too old -- /o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -376,7 +376,7 @@
       return 1;
     }
     # 437 Unwanted site ... in path
-    if ($left =~ /(\S+) <[^>]+> 437 Unwanted site (\S+) in path$/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Unwanted site (\S+) in path$/o) {
       my ($server, $site) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -385,7 +385,7 @@
       return 1;
     }
     # 437 Unwanted newsgroup "..."
-    if ($left =~ /(\S+) <[^>]+> 437 Unwanted newsgroup \"(\S+)\"$/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Unwanted newsgroup \"(\S+)\"$/o) {
       my ($server, $group) = ($1, $2);
       ($group) = split(/,/, $group);
       $server = lc $server unless $CASE_SENSITIVE;
@@ -395,7 +395,7 @@
       return 1;
     }
     # 437 Unwanted distribution "..."
-    if ($left =~ /(\S+) <[^>]+> 437 Unwanted distribution \"(\S+)\"$/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Unwanted distribution \"(\S+)\"$/o) {
       my ($server, $dist) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -404,7 +404,7 @@
       return 1;
     }
     # 437 Linecount x != y +- z
-    if ($left =~ /(\S+) <[^>]+> 437 Linecount/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Linecount/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -412,7 +412,7 @@
       return 1;
     }
     # 437 No colon-space in "xxxx" header
-    if ($left =~ /(\S+) <[^>]+> 437 No colon-space in \"[^\"]+\" header/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) No colon-space in \"[^\"]+\" header/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $inn_badart{$server}++;
@@ -421,7 +421,7 @@
       return 1;
     }
     # 437 Article posted in the future -- "xxxxx"
-    if ($left =~ /(\S+) <[^>]+> 437 Article posted in the future -- \"[^\"]+\"/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) Article posted in the future -- \"[^\"]+\"/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innd_posted_future{$server}++;
@@ -430,7 +430,7 @@
       return 1;
     }
     # 437 article includes "....."
-    if ($left =~ /(\S+) <[^>]+> 437 article includes/o) {
+    if ($left =~ /(\S+) <[^>]+> (?:437|439) article includes/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innd_strange_strings{$server}++;
@@ -913,6 +913,8 @@
     # Cleanfeed status reports
     return 1 if $left =~ /^filter: status/o;
     return 1 if $left =~ /^filter: Reloading bad files/o;
+    return 1 if $left =~ /^filter: Saved EMP database/o;
+    return 1 if $left =~ /^filter: Restored EMP database/o;
   }
   ########
   ## innfeed
@@ -1104,7 +1106,7 @@
   ## innxmit
   if ($prog eq "innxmit") {
     # 437 Duplicate article
-    if ($left =~ /(\S+) rejected [^\s]+ \(.*?\) 437 Duplicate article$/o) {
+    if ($left =~ /(\S+) rejected [^\s]+ \(.*?\) (?:437|439) Duplicate article$/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1112,7 +1114,7 @@
       return 1;
     }
     # 437 Unapproved for
-    if ($left =~ /(\S+) rejected [^\s]+ \(.*\) 437 Unapproved for \"(.*?)\"$/o) {
+    if ($left =~ /(\S+) rejected [^\s]+ \(.*\) (?:437|439) Unapproved for \"(.*?)\"$/o) {
       my ($server, $group) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1121,7 +1123,7 @@
       return 1;
     }
     # 437 Too old -- ...
-    if ($left =~ /(\S+) rejected [^\s]+ \(.*\) 437 Too old -- \".*?\"$/o) {
+    if ($left =~ /(\S+) rejected [^\s]+ \(.*\) (?:437|439) Too old -- \".*?\"$/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1130,7 +1132,7 @@
     }
     # 437 Unwanted site ... in path
     if ($left =~
-      /(\S+) rejected [^\s]+ \(.*?\) 437 Unwanted site (\S+) in path$/o) {
+      /(\S+) rejected [^\s]+ \(.*?\) (?:437|439) Unwanted site (\S+) in path$/o) {
       my ($server, $site) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1140,7 +1142,7 @@
     }
     # 437 Unwanted newsgroup "..."
     if ($left =~
-      /(\S+) rejected [^\s]+ \(.*?\) 437 Unwanted newsgroup \"(\S+)\"$/o) {
+      /(\S+) rejected [^\s]+ \(.*?\) (?:437|439) Unwanted newsgroup \"(\S+)\"$/o) {
       my ($server, $group) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1150,7 +1152,7 @@
     }
     # 437 Unwanted distribution "..."
     if ($left =~
-      /(\S+) rejected [^\s]+ \(.*?\) 437 Unwanted distribution \"(\S+)\"$/o) {
+      /(\S+) rejected [^\s]+ \(.*?\) (?:437|439) Unwanted distribution \"(\S+)\"$/o) {
       my ($server, $dist) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1159,7 +1161,7 @@
       return 1;
     }
     # xx rejected foo.bar/12345 (foo/bar/12345) 437 Unwanted distribution "..."
-    if ($left =~ /^(\S+) rejected .* 437 Unwanted distribution \"(\S+)\"$/o) {
+    if ($left =~ /^(\S+) rejected .* (?:437|439) Unwanted distribution \"(\S+)\"$/o) {
       my ($server, $dist) = ($1, $2);
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1168,7 +1170,7 @@
       return 1;
     }
     # 437 Linecount x != y +- z
-    if ($left =~ /(\S+) rejected [^\s]+ \(.*?\) 437 Linecount/o) {
+    if ($left =~ /(\S+) rejected [^\s]+ \(.*?\) (?:437|439) Linecount/o) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_badart{$server}++;
@@ -1176,7 +1178,7 @@
       return 1;
     }
     # 437 Newsgroup name illegal -- "xxx"
-    if ($left =~ /(\S+) rejected .* 437 Newsgroup name illegal -- "[^\"]*"$/) {
+    if ($left =~ /(\S+) rejected .* (?:437|439) Newsgroup name illegal -- "[^\"]*"$/) {
       my $server = $1;
       $server = lc $server unless $CASE_SENSITIVE;
       $innxmit_others{$server}++;
@@ -1827,52 +1829,52 @@
       return 1;
     }
     # rejected 437 Unwanted newsgroup
-    if ($left =~ /rejected 437 Unwanted newsgroup \"(.*)\"$/o) {
+    if ($left =~ /rejected (?:437|439) Unwanted newsgroup \"(.*)\"$/o) {
       $rnews_bogus_ng{$1}++;
       return 1;
     }
     # rejected 437 Unapproved for "xx"
-    if ($left =~ /rejected 437 Unapproved for \"(.*)\"$/o) {
+    if ($left =~ /rejected (?:437|439) Unapproved for \"(.*)\"$/o) {
       $rnews_unapproved{$1}++;
       return 1;
     }
     # rejected 437 Unwanted distribution
-    if ($left =~ /rejected 437 Unwanted distribution (.*)$/o) {
+    if ($left =~ /rejected (?:437|439) Unwanted distribution (.*)$/o) {
       $rnews_bogus_dist{$1}++;
       return 1;
     }
     # rejected 437 Bad "Date"
-    if ($left =~ /rejected 437 Bad \"Date\" (.*)$/o) {
+    if ($left =~ /rejected (?:437|439) Bad \"Date\" (.*)$/o) {
       $rnews_bogus_date{$1}++;
       return 1;
     }
     # rejected 437 Article posted in the future
-    if ($left =~ /rejected 437 Article posted in the future -- \"(.*)\"$/o) {
+    if ($left =~ /rejected (?:437|439) Article posted in the future -- \"(.*)\"$/o) {
       $rnews_bogus_date{"(future) $1"}++;
       return 1;
     }
     # rejected 437 Too old -- "..."
-    if ($left =~ /rejected 437 Too old -- (.*)$/o) {
+    if ($left =~ /rejected (?:437|439) Too old -- (.*)$/o) {
       $rnews_too_old++;
       return 1;
     }
     # rejected 437 Linecount...
-    if ($left =~ /rejected 437 (Linecount) \d+ \!= \d+/o) {
+    if ($left =~ /rejected (?:437|439) Linecount \d+ \!= \d+/o) {
       $rnews_linecount++;
       return 1;
     }
     # rejected 437 Duplicate
-    if ($left =~ /rejected 437 Duplicate$/o) {
+    if ($left =~ /rejected (?:437|439) Duplicate$/o) {
       $rnews_duplicate++;
       return 1;
     }
     # rejected 437 Duplicate article
-    if ($left =~ /rejected 437 (Duplicate article)/o) {
+    if ($left =~ /rejected (?:437|439) Duplicate article/o) {
       $rnews_duplicate++;
       return 1;
     }
     # rejected 437 No colon-space ...
-    if ($left =~ /rejected 437 No colon-space in \"(.*)\" header$/o) {
+    if ($left =~ /rejected (?:437|439) No colon-space in \"(.*)\" header$/o) {
       $rnews_no_colon_space++;
       return 1;
     }
@@ -1894,19 +1896,19 @@
       return 1;
     }
     # rejected 437 ECP rejected
-    return 1 if $left =~ m/rejected 437 ECP rejected/o;
+    return 1 if $left =~ m/rejected (?:437|439) ECP rejected/o;
     # rejected 437 "Subject" header too long
     return 1 if $left =~ m/header too long/o;
     # rejected 437 Too long line in header 1163 bytes
-    return 1 if $left =~ m/rejected 437 Too long line in header/o;
+    return 1 if $left =~ m/rejected (?:437|439) Too long line in header/o;
     # rejected 437 Too many newsgroups (meow)
-    return 1 if $left =~ m/rejected 437 Too many newsgroups/o;
+    return 1 if $left =~ m/rejected (?:437|439) Too many newsgroups/o;
     # rejected 437 Space before colon in "<a" header
-    return 1 if $left =~ m/rejected 437 Space before colon in/o;
+    return 1 if $left =~ m/rejected (?:437|439) Space before colon in/o;
     # rejected 437 EMP (phl)
-    return 1 if $left =~ m/rejected 437 EMP/o;
+    return 1 if $left =~ m/rejected (?:437|439) EMP/o;
     # rejected 437 Scoring filter (8)
-    return 1 if $left =~ m/rejected 437 Scoring filter/o;
+    return 1 if $left =~ m/rejected (?:437|439) Scoring filter/o;
     # bad_article missing Message-ID
     return 1 if $left =~ m/bad_article missing Message-ID/o;
     # cant unspool saving to xxx




More information about the inn-committers mailing list