summaryrefslogtreecommitdiff
path: root/src/mailman/rules/moderation.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-281-1/+1
|
* Refactor and simplify.Barry Warsaw2016-05-031-66/+53
|
* Minor cleanups, rewording, style.Barry Warsaw2016-05-031-21/+40
|
* Change handling of rules for banned addresses.Aditya2016-05-031-18/+16
| | | | | | | If any of the senders are banned, both the member moderation and nonmember moderation rules return False unconditionally. Add test for the above.
* Ensure that postings from alternative emails aren't heldAditya2016-05-031-6/+38
| | | | | Check if the posting address is linked to a user who is subscribed to the list. If yes, the post is not held for moderation.
* Don't use `flake8: noqa`.Barry Warsaw2016-04-011-1/+1
| | | | | | | This suppresses all errors in the file. Use `noqa`, although pep8 doesn't honor this for all errors. There may be a plugin which helps.
* Allow fall backs for moderation actions.Barry Warsaw2016-04-011-4/+6
| | | | | | | | | The `moderation_action` for members and nonmember can now be ``None`` which signals falling back to the appropriate list default action, e.g. `default_member_action` and `default_nonmember_action`. Given by Aurélien Bompard. Closes #189
* Members and nonmembers moderation action fallbackAurélien Bompard2016-03-311-3/+6
| | | | | | | | Members and nonmember's moderation action should be None by default, and in that case the moderation rule should fallback to the mailing list's default action. Fixes: #189
* Clean up the rules directory.Barry Warsaw2016-03-251-8/+6
|
* First massive round of cleanups.Barry Warsaw2016-03-231-10/+7
| | | | | | | | * Get rid of explicit __all__ settings and use the @public decorator. * Get rid of ^L's * Use expected_count argument for get_queue_messages() * Various code modernizations. * Other minor changes to make flake8 happy.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Do a cleansing pass on abompard's branch.Barry Warsaw2015-06-241-14/+21
|
* Use the *_these_nonmembers properties for moderationAurélien Bompard2015-06-171-2/+17
|
* Implement reasons for why a message is being held for moderator approval.Barry Warsaw2015-05-111-0/+6
| | | | | | | Given by Aurélien Bompard, tweaked by Barry Warsaw. Remove the inaccurate confirmation url and admindb urls from the substitution dictionaries for postauth.txt and posthold.txt, and the templates.
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-6/+2
|
* * Fix non-member moderation rule to prefer a member sender if both membersBarry Warsaw2014-03-151-0/+4
| | | | | and non-members are in the message's sender list. Given by Aurélien Bompard. (LP: #1291452)
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* General code cleanup.Barry Warsaw2012-04-251-4/+4
| | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
* Do not taunt Happy Python 2.6 Fun Ball.Barry Warsaw2012-03-141-2/+2
| | | | | Clean up Python 2.7-isms and deprecations that break the tests suite on Python 2.6.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Refactor .subscribe() from IAddress to IMailingList.Barry Warsaw2011-04-161-1/+1
|
* Split member and nonmember moderation.Barry Warsaw2011-01-021-11/+47
| | | | | | | | | | | | | | | | * member-moderation happens at the same place in the built-in chain that the previously named moderation rule happens. nonmember-moderation happens after all the other normal moderation rules. * Handle unsubscribed nonmember posts. Other changes: * Message.senders now filters out Nones and empty strings. * Various test cleanups and simplifications. * More `address` -> `email` fixes. * Give Link class a useful repr. * Fix a potential UnboundLocalError. * Various other small changes.
* Happy New Year.Barry Warsaw2011-01-011-1/+1
|
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-291-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Now, nonmembers are represented by a separate roster of IMembers, the latter which has grown a `moderation_action` enum. When that action is `defer`, then the normal processing rules apply. Anything else and the `moderation` chain is jumped to for a shortcut to moderation (which may include immediate acceptance). TODO: handle unregistered nonmembers. Details: * The member-moderation rule is renamed to just moderation, and handles both members and nonmembers (though the latter must currently be registered). * The moderation rule is moved up in the builtin chain. It is now checked after `approved`, `emergency`, and `loop`, but before the normal moderation checks. This means that nonmember postings will be (by default) held much earlier. * IMember.is_moderated is removed. * IMember.moderation_action is added. * IMailingList.default_member_moderation is removed. * IMailingList.default_member_action and IMailingList.default_nonmember_action are added. * MemberRole.nonmember is added.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lp:~jimmy-sigint/mailman/restapi_additional_attributes Ostensibly, this adds support for a few additional attributes through the REST API: * default_member_moderation * generic_nonmember_action * member_moderation_action * reply_goes_to_list * send_welcome_msg * welcome_msg However, I had never previously fleshed out the conversion of default_member_moderation and member_moderation_action into the MM3 way of things. That is now done. Non-member moderation still needs to be done. Specific changes: * mailman.chains.base.Chain no longer self registers * The built-in chain gets a new link for checking 'member-moderation'. If this rule matches, it jumps to the 'member-moderation' chain, which checks member_moderation_action and returns a link that jumps to the appropriate terminal chain. * Chain initialization is done by the same auto-detection as rules, handlers, etc. The one tricky thing is that abstract base classes such as Chain and TerminalChainBase can't be instantiated. For now, there's an ugly special case to skip these. * default_member_moderation is now exposed in the IMailingList interface. * Member.is_moderated gets set in the constructor from the mailing list's default_member_moderation. * The 'moderation' rule is renamed 'member-moderation'. TODO: * Work out non-member moderation * Add member_moderation_action to IMailingList * Double check tests for reply_goes_to_list, send_welcome_msg, and welcome_msg
* Happy New Year.Barry Warsaw2010-01-011-1/+1
|
* Factor out most of the i18n subsystem and convert to using the flufl.i18nBarry Warsaw2009-11-151-1/+1
| | | | package.
* Move mailman.Message to mailman.email.Message. Rename Message.get_sender() toBarry Warsaw2009-02-091-2/+2
| | | | | | | | | Message.sender (property) and Message.get_senders() to Message.senders (another property). The semantics of .sender is slightly different too; it no longer consults config.mailman.use_envelope_sender. Add absolute_import and unicode_literals to Utils.py, and clean up a few imports.
* Push the source directory into a 'src' subdirectory so that zc.buildout worksBarry Warsaw2009-01-251-0/+68
correctly regardless of how it's used.