X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-mtm.git;a=blobdiff_plain;f=inews.INO;h=915dd6eab3043758f5fa883913a3924ee7cbda71;hp=1b8892ff383818808a65b26d06bb3aee284d83ba;hb=6f351c431597602981554accce49bc31d37be157;hpb=ce1dd391f89ea63bd72f48a3f15c147d239fa70d;ds=sidebyside diff --git a/inews.INO b/inews.INO index 1b8892f..915dd6e 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 ` @@ -40,4 +40,4 @@ fi echo echo ====================== cat $tf -) | mail -s 'lost moderated newsgroup submission' webstump +) | mail -s "lost moderated newsgroup submission %ABBREV%" webstump