chiark / gitweb /
inject: Only insert an Approved header if one was requested.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 28 Mar 2006 12:19:00 +0000 (13:19 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 28 Mar 2006 12:19:00 +0000 (13:19 +0100)
bin/inject
bin/post

index 6dbfdb3..3d7c65d 100755 (executable)
@@ -104,8 +104,8 @@ def send():
   hdr.write('Path: newsgate\r\n'
             'Distribution: mail\r\n'
             'Newsgroups: %s\r\n'
-            'Approved: %s\r\n'
-            % (group, approved or 'newsgate@%s' % host))
+            % group)
+  if approved: hdr.write('Approved: %s\r\n' % approved)
   xify = {}
   for h in '''
     lines xref newsgroups path distribution approved received
index 43e5f32..3ca4520 100755 (executable)
--- a/bin/post
+++ b/bin/post
@@ -8,4 +8,4 @@ tag=$1
 entry=`cdb -q groups.cdb "t:$tag"` || bad "unknown tag $tag"
 set -- $entry
 case "$SENDER" in $4) ;; *) bad "incorrect sender $SENDER" ;; esac
-exec bin/inject mail.$2
+exec bin/inject -a newsgate@distorted.org.uk mail.$2