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 99c750a..6acee1a 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%"