chiark / gitweb /
filter out some system headers in inews
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2010 01:22:57 +0000 (02:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Jun 2010 01:22:57 +0000 (02:22 +0100)
inews.INO

index 99c750a1ee926bbbfa4651a6b3fb20492798d713..6acee1afcbc21fc0169b88ac0bd310c1fd9328c6 100755 (executable)
--- a/inews.INO
+++ b/inews.INO
@@ -15,7 +15,10 @@ output=`
        set -e
        exec 2>&1
        if [ x%DIVERTPOSTINGS% = x ]; then
-               inews -h -Q -R <$tf
+               perl -pe '
+                       next unless ($.==1)../^$/;
+                       s/^(?:X-Trace|NNTP-Posting-(?:Date|Host))/X-$&/;
+               ' $tf | inews -h -Q -R
        else
                (set -e
                 echo "Newsgroups: %DIVERTPOSTINGS%"