X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?a=blobdiff_plain;ds=sidebyside;f=inews.INO;h=df077110acdbaac787d2560624ce9b3778075e1e;hb=73de008242b8c16caf85f5134ae63fbc90365f4b;hp=1b8892ff383818808a65b26d06bb3aee284d83ba;hpb=04e4ec16a8c42202d3c207067b81c513b7eff740;p=modbot-mtm.git diff --git a/inews.INO b/inews.INO index 1b8892f..df07711 100755 --- a/inews.INO +++ b/inews.INO @@ -1,9 +1,6 @@ #!/bin/sh set -e -#real=false -real=true - export NNTPSERVER=nnrp.chiark.greenend.org.uk export NNTPAUTH='md5cookie1way chiark' @@ -17,11 +14,14 @@ set +e output=` set -e exec 2>&1 - if $real; then - inews -h -Q -R <$tf + if [ x%DIVERTPOSTINGS% = x ]; then + 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: %TESTGROUP%" + echo "Newsgroups: %DIVERTPOSTINGS%" sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h fi `