inject: Only insert an Approved header if one was requested.
[newsgate] / bin / post
index fbcea27..3ca4520 100755 (executable)
--- a/bin/post
+++ b/bin/post
@@ -7,4 +7,5 @@ set -e
 tag=$1
 entry=`cdb -q groups.cdb "t:$tag"` || bad "unknown tag $tag"
 set -- $entry
-exec mailpost.newsgate -a $USER@`cat $QMAIL/control/me` -d mail mail.$2
+case "$SENDER" in $4) ;; *) bad "incorrect sender $SENDER" ;; esac
+exec bin/inject -a newsgate@distorted.org.uk mail.$2