From 8a21922e3f8cdcaf66a0bec775b33d309d53ba50 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sat, 6 Mar 1999 05:20:30 +0000 Subject: tmp_prevent_gate attribute on the MailList objects is gone! Stick a `fromusenet' attribute on the msg object, value taken from whether there is a magical second argument to the post script (only happens from GatewayManager). Also post message with approved flag set to fromusenet, so message originating on Usenet are pre-approved. --- scripts/post | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'scripts/post') diff --git a/scripts/post b/scripts/post index 0f3c6701d..b180043d7 100755 --- a/scripts/post +++ b/scripts/post @@ -44,9 +44,10 @@ LogStdErr("error", "post") # TODO: This can fail, and should send back an error message when it does. current_list = MailList.MailList(sys.argv[1]) if len(sys.argv) > 2: - current_list.tmp_prevent_gate = 1 + # assert sys.argv[1] == 'fromusenet' + fromusenet = 1 else: - current_list.tmp_prevent_gate = 0 + fromusenet = 0 try: prog = current_list.filter_prog if prog: @@ -60,9 +61,16 @@ try: else: text = sys.stdin.read() msg = Message.IncomingMessage(text) - + # this attribute is a flag to both the GatewayManager and the approval + # mechanism. When a message originates from Usenet, we do not want to + # post it back there again. Also, such messages are never held for + # approval. It makes no sense to send an acknowledgement to the author -- + # who may not even know of the mailing list's existance. It *might* still + # make sense to hold the message for approval, but I suspect that's just + # more of a PITA for the list owner. + msg.fromusenet = fromusenet try: - current_list.Post(msg) + current_list.Post(msg, approved=fromusenet) except Errors.MMNeedApproval, err_msg: if (current_list.dont_respond_to_post_requests or err_msg == Errors.MODERATED_LIST_MSG): -- cgit v1.2.3-70-g09d2