chiark / gitweb /
Strip X-Complaints-To too
[modbot-mtm.git] / inews.INO
index 99c750a1ee926bbbfa4651a6b3fb20492798d713..3f74debdfe3be09318190fc7c0b0c9e721a1d2f1 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-Complaints-To)/X-$&/;
+               ' $tf | inews -h -Q -R
        else
                (set -e
                 echo "Newsgroups: %DIVERTPOSTINGS%"