summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorbwarsaw1999-03-06 05:20:30 +0000
committerbwarsaw1999-03-06 05:20:30 +0000
commit8a21922e3f8cdcaf66a0bec775b33d309d53ba50 (patch)
tree31bfbbd9070b9e8c48be2f9a1dc9bc9a0a6e29da /scripts
parent101e0a28082160a0f3a43e61a79a1af3dfde2d4a (diff)
downloadmailman-8a21922e3f8cdcaf66a0bec775b33d309d53ba50.tar.gz
mailman-8a21922e3f8cdcaf66a0bec775b33d309d53ba50.tar.zst
mailman-8a21922e3f8cdcaf66a0bec775b33d309d53ba50.zip
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/post16
1 files changed, 12 insertions, 4 deletions
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):