INN commit: trunk (6 files)

INN Commit rra at isc.org
Fri Dec 4 18:29:09 UTC 2009


    Date: Friday, December 4, 2009 @ 10:29:09
  Author: iulius
Revision: 8841

Add access to three new headers within Perl and Python hooks for innd:

    * Archive     [RFC 5536]
    * Archived-At [RFC 5064]
    * Summary     [RFC 5536]

Also update the POD documentation and the Python sample.

Modified:
  trunk/doc/pod/hook-perl.pod
  trunk/doc/pod/hook-python.pod
  trunk/innd/innd.c
  trunk/innd/innd.h
  trunk/samples/filter_innd.py
  trunk/tests/innd/fakeinnd.c

-------------------------+
 doc/pod/hook-perl.pod   |    4 ++--
 doc/pod/hook-python.pod |    4 ++--
 innd/innd.c             |   10 ++++++++--
 innd/innd.h             |    5 ++++-
 samples/filter_innd.py  |    9 ++++++---
 tests/innd/fakeinnd.c   |    5 ++++-
 6 files changed, 26 insertions(+), 11 deletions(-)

Modified: doc/pod/hook-perl.pod
===================================================================
--- doc/pod/hook-perl.pod	2009-12-03 21:13:25 UTC (rev 8840)
+++ doc/pod/hook-perl.pod	2009-12-04 18:29:09 UTC (rev 8841)
@@ -81,7 +81,7 @@
 the standard headers present in the article and their values.  The
 standard headers are:
 
-    Also-Control, Approved, Bytes, Cancel-Key, Cancel-Lock,
+    Also-Control, Approved, Archive, Archived-At, Bytes, Cancel-Key, Cancel-Lock,
     Content-Base, Content-Disposition, Content-Transfer-Encoding,
     Content-Type, Control, Date, Date-Received, Distribution, Expires,
     Face, Followup-To, From, In-Reply-To, Injection-Date, Injection-Info,
@@ -89,7 +89,7 @@
     NNTP-Posting-Date, NNTP-Posting-Host, NNTP-Posting-Path,
     Organization, Original-Sender, Originator,
     Path, Posted, Posting-Version, Received, References, Relay-Version,
-    Reply-To, Sender, Subject, Supersedes, User-Agent,
+    Reply-To, Sender, Subject, Summary, Supersedes, User-Agent,
     X-Auth, X-Auth-Sender, X-Canceled-By, X-Cancelled-By, X-Complaints-To,
     X-Face, X-HTTP-UserAgent, X-HTTP-Via, X-Mailer, X-Modbot, X-Modtrace,
     X-Newsposter, X-Newsreader, X-No-Archive, X-Original-Message-ID,

Modified: doc/pod/hook-python.pod
===================================================================
--- doc/pod/hook-python.pod	2009-12-03 21:13:25 UTC (rev 8840)
+++ doc/pod/hook-python.pod	2009-12-04 18:29:09 UTC (rev 8841)
@@ -70,7 +70,7 @@
 is called every time B<innd> receives an article.  The following can be
 defined:
 
-    Also-Control, Approved, Bytes, Cancel-Key, Cancel-Lock,
+    Also-Control, Approved, Archive, Archived-At, Bytes, Cancel-Key, Cancel-Lock,
     Content-Base, Content-Disposition, Content-Transfer-Encoding,
     Content-Type, Control, Date, Date-Received, Distribution, Expires,
     Face, Followup-To, From, In-Reply-To, Injection-Date, Injection-Info,
@@ -78,7 +78,7 @@
     NNTP-Posting-Date, NNTP-Posting-Host, NNTP-Posting-Path,
     Organization, Original-Sender, Originator,
     Path, Posted, Posting-Version, Received, References, Relay-Version,
-    Reply-To, Sender, Subject, Supersedes, User-Agent,
+    Reply-To, Sender, Subject, Summary, Supersedes, User-Agent,
     X-Auth, X-Auth-Sender, X-Canceled-By, X-Cancelled-By, X-Complaints-To,
     X-Face, X-HTTP-UserAgent, X-HTTP-Via, X-Mailer, X-Modbot, X-Modtrace,
     X-Newsposter, X-Newsreader, X-No-Archive, X-Original-Message-ID,

Modified: innd/innd.c
===================================================================
--- innd/innd.c	2009-12-03 21:13:25 UTC (rev 8840)
+++ innd/innd.c	2009-12-04 18:29:09 UTC (rev 8841)
@@ -203,10 +203,16 @@
 /* #define HDR__X_ORIGINAL_NNTP_POSTING_HOST    68 */
   ARTHEADERINIT("Original-Sender",      HTstd),
 /* #define HDR__ORIGINAL_SENDER                 69 */
-  ARTHEADERINIT("NNTP-Posting-Path",    HTstd)
+  ARTHEADERINIT("NNTP-Posting-Path",    HTstd),
 /* #define HDR__NNTP_POSTING_PATH               70 */
+  ARTHEADERINIT("Archive",              HTstd),
+/* #define HDR__ARCHIVE                         71 */
+  ARTHEADERINIT("Archived-At",          HTstd),
+/* #define HDR__ARCHIVED_AT                     72 */
+  ARTHEADERINIT("Summary",              HTstd)
+/* #define HDR__SUMMARY                         73 */
 };
-/* #define MAX_ARTHEADER                        71 */
+/* #define MAX_ARTHEADER                        74 */
 
 
 /*

Modified: innd/innd.h
===================================================================
--- innd/innd.h	2009-12-03 21:13:25 UTC (rev 8840)
+++ innd/innd.h	2009-12-04 18:29:09 UTC (rev 8841)
@@ -210,8 +210,11 @@
 #define HDR__X_ORIGINAL_NNTP_POSTING_HOST       68
 #define HDR__ORIGINAL_SENDER    69
 #define HDR__NNTP_POSTING_PATH  70
+#define HDR__ARCHIVE            71
+#define HDR__ARCHIVED_AT        72
+#define HDR__SUMMARY            73
 
-#define MAX_ARTHEADER           71
+#define MAX_ARTHEADER           74
 
 /*
 **  Miscellaneous data we want to keep on an article.  All the fields

Modified: samples/filter_innd.py
===================================================================
--- samples/filter_innd.py	2009-12-03 21:13:25 UTC (rev 8840)
+++ samples/filter_innd.py	2009-12-04 18:29:09 UTC (rev 8841)
@@ -33,6 +33,8 @@
 ##  losing some strcmps under the covers.
 Also_Control = intern("Also-Control")
 Approved = intern("Approved")
+Archive = intern("Archive")
+Archived_At = intern("Archived-At")
 Bytes = intern("Bytes")
 Cancel_Key = intern("Cancel-Key")
 Cancel_Lock = intern("Cancel-Lock")
@@ -72,6 +74,7 @@
 Reply_To = intern("Reply-To")
 Sender = intern("Sender")
 Subject = intern("Subject")
+Summary = intern("Summary")
 Supersedes = intern("Supersedes")
 User_Agent = intern("User-Agent")
 X_Auth = intern("X-Auth")
@@ -103,7 +106,7 @@
 X_User_ID = intern("X-User-ID")
 Xref = intern("Xref")
 __BODY__ = intern("__BODY__")
-_LINES__ = intern("__LINES__")
+__LINES__ = intern("__LINES__")
 
 
 class InndFilter:
@@ -169,7 +172,7 @@
         The available headers are the ones listed near the top of
         innd/art.c.  At this writing, they are:
 
-            Also-Control, Approved, Bytes, Cancel-Key, Cancel-Lock,
+            Also-Control, Approved, Archive, Archived-At, Bytes, Cancel-Key, Cancel-Lock,
             Content-Base, Content-Disposition, Content-Transfer-Encoding,
             Content-Type, Control, Date, Date-Received, Distribution, Expires,
             Face, Followup-To, From, In-Reply-To, Injection-Date, Injection-Info,
@@ -177,7 +180,7 @@
             NNTP-Posting-Date, NNTP-Posting-Host, NNTP-Posting-Path,
             Organization, Original-Sender, Originator,
             Path, Posted, Posting-Version, Received, References, Relay-Version,
-            Reply-To, Sender, Subject, Supersedes, User-Agent,
+            Reply-To, Sender, Subject, Summary, Supersedes, User-Agent,
             X-Auth, X-Auth-Sender, X-Canceled-By, X-Cancelled-By, X-Complaints-To,
             X-Face, X-HTTP-UserAgent, X-HTTP-Via, X-Mailer, X-Modbot, X-Modtrace,
             X-Newsposter, X-Newsreader, X-No-Archive, X-Original-Message-ID,

Modified: tests/innd/fakeinnd.c
===================================================================
--- tests/innd/fakeinnd.c	2009-12-03 21:13:25 UTC (rev 8840)
+++ tests/innd/fakeinnd.c	2009-12-04 18:29:09 UTC (rev 8841)
@@ -102,7 +102,10 @@
     ARTHEADERINIT("X-Auth-Sender",         HTstd),
     ARTHEADERINIT("X-Original-NNTP-Posting-Host", HTstd),
     ARTHEADERINIT("Original-Sender",       HTstd),
-    ARTHEADERINIT("NNTP-Posting-Path",     HTstd)
+    ARTHEADERINIT("NNTP-Posting-Path",     HTstd),
+    ARTHEADERINIT("Archive",               HTstd),
+    ARTHEADERINIT("Archived-At",           HTstd),
+    ARTHEADERINIT("Summary",               HTstd)
 };
 
 /* Dummy functions that innd.c provides. */




More information about the inn-committers mailing list