chiark / gitweb /
strip out some system headers, caused trouble during my testing
[modbot-mtm.git] / inews.INO
index 99c750a..915dd6e 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|Injection-Info)/X-$&/;
+               ' $tf | inews -h -Q -R
        else
                (set -e
                 echo "Newsgroups: %DIVERTPOSTINGS%"
@@ -37,4 +40,4 @@ fi
        echo
        echo ======================
        cat $tf
-) | mail -s 'lost moderated newsgroup submission' webstump
+) | mail -s "lost moderated newsgroup submission %ABBREV%" webstump