Re: [Mailman-Users] newsgroup-mailman moderation
2015-07-17 18:24 GMT+03:00 Mark Sapiro m...@msapiro.net: Headers/Footers are added by Mailman/Handlers/Decorate.py. Decorate.process is called by Mailman/Handlers/SPTPDirect.py to apply the replacements to msg_header and msg_footer and add them to the message. You would need to do something similar in Mailman/Handlers/ToUsenet.py. Yes, it was quite easy. Attaching the patch for Mailman/Handlers/ToUsenet.py for version 2.1.20. -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 7/19/15 2:17 AM, Danil Smirnov wrote: 2015-07-17 18:24 GMT+03:00 Mark Sapiro m...@msapiro.net: Headers/Footers are added by Mailman/Handlers/Decorate.py. Decorate.process is called by Mailman/Handlers/SPTPDirect.py to apply the replacements to msg_header and msg_footer and add them to the message. You would need to do something similar in Mailman/Handlers/ToUsenet.py. Yes, it was quite easy. Attaching the patch for Mailman/Handlers/ToUsenet.py for version 2.1.20. Your patch didn't make it through this list's content filtering which accepts only text/plain, text/x-diff and application/pgp-signature elementary MIME types. A better way to deal with this for MM 2.1 is to create an issue at https://bugs.launchpad.net/mailman/+filebug and attach your patch or a merge proposal. For MM 3 the process is similar except the tracker is at https://gitlab.com/mailman/mailman/issues. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 7/17/15 2:13 AM, Danil Smirnov wrote: To complete the topic, I would like also to add Mailman footers to messages, gatewayed to the group. (They are not added by default...) Could you please point me to the lines of code doing this? Headers/Footers are added by Mailman/Handlers/Decorate.py. Decorate.process is called by Mailman/Handlers/SPTPDirect.py to apply the replacements to msg_header and msg_footer and add them to the message. You would need to do something similar in Mailman/Handlers/ToUsenet.py. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
2015-07-13 18:05 GMT+03:00 Mark Sapiro m...@msapiro.net: member_moderation action = Reject, a notice will be sent. The moral here is never Reject non-member posts, either Hold them or Discard them. Got it, Mark! To complete the topic, I would like also to add Mailman footers to messages, gatewayed to the group. (They are not added by default...) Could you please point me to the lines of code doing this? Thanks, Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
Another question: how about acknowledges for users from the Usernet? Will they get them after post will be gatewaying to the list? -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
2015-07-13 17:23 GMT+03:00 Mark Sapiro m...@msapiro.net: If a post from someone who is a member of the gated mail list is gated from the Usenet group to the mail list, and the poster's Receive acknowledgement mail when you send mail to the list? (ack) option is Yes, an acknowledgement will be sent when the post is delivered to the mail list. It looks like I'm confused with this topic. I'm afraid of the situation where people from Usenet become get some notifications from the Mailman saying, for instance, that their message is placed on hold for moderation or similar. This is very undesirable situation (actual spamming of them) and I worry a lot about it after correction in Moderate.py I made. Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 7/13/15 3:16 AM, Danil Smirnov wrote: Another question: how about acknowledges for users from the Usernet? Will they get them after post will be gatewaying to the list? If a post from someone who is a member of the gated mail list is gated from the Usenet group to the mail list, and the poster's Receive acknowledgement mail when you send mail to the list? (ack) option is Yes, an acknowledgement will be sent when the post is delivered to the mail list. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 7/13/15 7:36 AM, Danil Smirnov wrote: 2015-07-13 17:23 GMT+03:00 Mark Sapiro m...@msapiro.net: If a post from someone who is a member of the gated mail list is gated from the Usenet group to the mail list, and the poster's Receive acknowledgement mail when you send mail to the list? (ack) option is Yes, an acknowledgement will be sent when the post is delivered to the mail list. It looks like I'm confused with this topic. Or I was confused ... I'm afraid of the situation where people from Usenet become get some notifications from the Mailman saying, for instance, that their message is placed on hold for moderation or similar. This is very undesirable situation (actual spamming of them) and I worry a lot about it after correction in Moderate.py I made. Notices to the poster of held posts are not sent if the post is gated from Usenet. If a post gated from Usenet is rejected because it is from a non-member in reject_these_nonmembers or with your change a non-member with generic_nonmember_action = Reject or from a moderated member with member_moderation action = Reject, a notice will be sent. The moral here is never Reject non-member posts, either Hold them or Discard them. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
2015-07-12 19:42 GMT+03:00 Mark Sapiro m...@msapiro.net: On the other hand, you could just remove the fromusenet test and apply generic_nonmember_action to all posts whether or not from Usenet. I.e., just change if mlist.generic_nonmember_action == 0 or msgdata.get('fromusenet'): to if mlist.generic_nonmember_action == 0: Mark, I've made this correction but posts from Usenet continue to be posted to the list without any moderation. generic_nonmember_action is set to 'Hold'. Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On July 12, 2015 2:06:17 PM PDT, Danil Smirnov da...@smirnov.la wrote: 2015-07-12 19:42 GMT+03:00 Mark Sapiro m...@msapiro.net: On the other hand, you could just remove the fromusenet test and apply generic_nonmember_action to all posts whether or not from Usenet. I.e., just change if mlist.generic_nonmember_action == 0 or msgdata.get('fromusenet'): to if mlist.generic_nonmember_action == 0: Mark, I've made this correction but posts from Usenet continue to be posted to the list without any moderation. generic_nonmember_action is set to 'Hold'. Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/mark%40msapiro.net Did you restart Mailman? Are the posts from nonmembers? -- Mark Sapiro m...@msapiro.net Sent from my Android phone with K-9 Mail. [Unpaid endorsement] -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
2015-07-13 0:54 GMT+03:00 Mark Sapiro m...@msapiro.net: Did you restart Mailman? Oops, forgot it. Thanks! Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
[Mailman-Users] newsgroup-mailman moderation
Hi Mark! I've found your posting advising how to set all posts from Usenet group to moderation: https://mail.python.org/pipermail/mailman-users/2013-June/075346.html When look into Moderate.py I've found another code than mentioned in the post: --- # Okay, so the sender wasn't specified explicitly by any of the non-member # moderation configuration variables. Handle by way of generic non-member # action. assert 0 = mlist.generic_nonmember_action = 4 if mlist.generic_nonmember_action == 0 or msgdata.get('fromusenet'): # Accept return elif mlist.generic_nonmember_action == 1: Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost) elif mlist.generic_nonmember_action == 2: do_reject(mlist) elif mlist.generic_nonmember_action == 3: do_discard(mlist, msg) --- Is it correct to change the code in this way? --- # Okay, so the sender wasn't specified explicitly by any of the non-member # moderation configuration variables. Handle by way of generic non-member # action. assert 0 = mlist.generic_nonmember_action = 4 if mlist.generic_nonmember_action == 0: # Accept return elif mlist.generic_nonmember_action == 1 or msgdata.get('fromusenet'): Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost) elif mlist.generic_nonmember_action == 2: do_reject(mlist) elif mlist.generic_nonmember_action == 3: do_discard(mlist, msg) --- TIA, Danil -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 7/12/15 8:05 AM, Danil Smirnov wrote: Hi Mark! I've found your posting advising how to set all posts from Usenet group to moderation: https://mail.python.org/pipermail/mailman-users/2013-June/075346.html The change suggested in that post was applied to the distributed code as of Mailman 2.1.17. See https://bugs.launchpad.net/mailman/+bug/1252575. When look into Moderate.py I've found another code than mentioned in the post: --- # Okay, so the sender wasn't specified explicitly by any of the non-member # moderation configuration variables. Handle by way of generic non-member # action. assert 0 = mlist.generic_nonmember_action = 4 if mlist.generic_nonmember_action == 0 or msgdata.get('fromusenet'): # Accept return elif mlist.generic_nonmember_action == 1: Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost) elif mlist.generic_nonmember_action == 2: do_reject(mlist) elif mlist.generic_nonmember_action == 3: do_discard(mlist, msg) --- Is it correct to change the code in this way? --- # Okay, so the sender wasn't specified explicitly by any of the non-member # moderation configuration variables. Handle by way of generic non-member # action. assert 0 = mlist.generic_nonmember_action = 4 if mlist.generic_nonmember_action == 0: # Accept return elif mlist.generic_nonmember_action == 1 or msgdata.get('fromusenet'): Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost) elif mlist.generic_nonmember_action == 2: do_reject(mlist) elif mlist.generic_nonmember_action == 3: do_discard(mlist, msg) --- The change you suggest will 'hold' all non-member posts from usenet as long as generic_nonmember_action is other than accept and the poster's address is not in one of the *_these_nonmember filters. If that's what you want, then the change looks correct. On the other hand, you could just remove the fromusenet test and apply generic_nonmember_action to all posts whether or not from Usenet. I.e., just change if mlist.generic_nonmember_action == 0 or msgdata.get('fromusenet'): to if mlist.generic_nonmember_action == 0: The difference is with your change if generic_nonmember_action is Reject or Discard, posts from Usenet will still be held and not rejected or discarded, but just removing the fromusenet test will allow generic_nonmember_action to apply to all posts. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org
[Mailman-Users] newsgroup-mailman moderation
Greetings, For gnu.org, we have always had gatewaying between Usenet and mailman for quite a few lists, e.g., help-gnu-emacs and bug-gnu-utils. When a message is gatewayed *from* Usenet to the mailing list, Mailman evidently omits any of the usual moderation features (generic_nonmember_action and the like). Mark (Sapiro) mentioned this in http://mail.python.org/pipermail/mailman-users/2008-April/061154.html, and it's also the behavior that we have always seen. Evidently due to the inq.enqueue call in gate_news, around line 179 in 2.1.15. However, spam does get posted to Usenet, and we don't want it to simply be blindly injected into the mailing lists. The workaround we've been using is to add Newsgroups: to the Spam Filter Regexp with Action=Hold for header_filter_rules (in Privacy Options Spam filters). That holds the incoming posts from Usenet. But the downside is significant: every Usenet post is held, even when it would otherwise be approved (e.g., it comes from a known whitelisted address). So, we would really like to have posts from Usenet be subject to the normal mailman moderation rules (for purposes of both holding and accepting messages). Is it feasible to hack gate_news to make that happen? Help? Unfortunately my own mailman-fu is not nearly up to the job :(. Thanks, Karl -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Re: [Mailman-Users] newsgroup-mailman moderation
On 06/28/2013 11:48 AM, Karl Berry wrote: So, we would really like to have posts from Usenet be subject to the normal mailman moderation rules (for purposes of both holding and accepting messages). Is it feasible to hack gate_news to make that happen? Help? Unfortunately my own mailman-fu is not nearly up to the job :(. You could hack gate_news by changing inq.enqueue(msg, listname = mlist.internal_name(), fromusenet = 1) to inq.enqueue(msg, listname = mlist.internal_name(), ) i.e., just drop the fromusenet = 1, but DO NOT DO THIS. It will work, but if your usenet gating is bidirectional it will possibly cause a mail loop as the post from usenet will be posted back to usenet. It's better to leave gate_news as is and make the following changes. To enable list membership and *_these_nonmembers tests, at about line 50 in Mailman/Handlers/Moderate.py, change if msgdata.get('approved') or msgdata.get('fromusenet'): to if msgdata.get('approved'): The various miscellaneous holds applied by Mailman/Handlers/Hold.py are already applied to usnet posts with the exception of require_explicit_destination which you don't want anyway, so no changes should be necessary there. -- Mark Sapiro m...@msapiro.netThe highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -- Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org