chiark / gitweb /
Merge branch 'master' of /u/webstump/live-urcm
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:54:53 +0000 (11:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:54:53 +0000 (11:54 +0000)
get-settings
inews.INO
stump/etc/modack.approved.INO

index 4226b29..5c71c46 100644 (file)
@@ -4,8 +4,11 @@ paskeys='KEYSUBMIT KEYSTUMP2WEB KEYWEB2STUMP'
 pas="$paskeys"
 for k in $pas; do eval "$k=''"; export $k; done
 
+DIVERTPOSTINGS=''
+
 . settings
 export GROUP ABBREV INFOHEADER MODEMAIL GROUPURL REJECTIONSLIST
+export DIVERTPOSTINGS
 
 . ../global-settings
 export ROOTBASEDIR CGIBASEURL DOMAIN SLIMYDOMAIN OURUSER ADMIN
index 1b8892f..99c750a 100755 (executable)
--- 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,11 @@ set +e
 output=`
        set -e
        exec 2>&1
-       if $real; then
+       if [ x%DIVERTPOSTINGS% = x ]; then
                inews -h -Q -R <$tf
        else
                (set -e
-                echo "Newsgroups: %TESTGROUP%"
+                echo "Newsgroups: %DIVERTPOSTINGS%"
                 sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h
        fi
 `
index 17f9717..cdc3d1c 100755 (executable)
@@ -3,10 +3,16 @@
 set -e
 set -o pipefail
 
+if [ $# != 1 ]; then
+       echo >&2 "wrong # args to $0: $*"
+       exit 1
+fi
+input="$1"
+
 (
-  cat $@ | formail -rt -I "Reply-To: $NOACK" \
-        -I "X-Webstump-Event: approve" \
-       $MAILOUT_ACCEPTACK_FORMAIL_ARGS
+  formail <"$input" -rt -I "Reply-To: $NOACK"  \
+               -I "X-Webstump-Event: approve"  \
+               $MAILOUT_ACCEPTACK_FORMAIL_ARGS
   cat <<_EOB_
 Hello,