summaryrefslogtreecommitdiff
path: root/src/mailman/chains (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Boost coverage.Barry Warsaw2016-01-031-1/+1
| | | | | | Use coverage.ini to ignore a few common idioms, so as to reduce code clutter. Invoke coverage slightly differently in the tox.ini.
* Happy New Year.Barry Warsaw2016-01-0214-14/+14
|
* Make sure that Pendables always have a typeAurélien Bompard2015-12-161-3/+2
|
* Reject notifications contained no reason.Aurélien Bompard2015-12-122-2/+87
| | | | | | Implement the suggestions from the review. Cleanups by Barry.
* Reorder the default-posting-chain to avoid spam.Aurélien Bompard2015-11-212-13/+5
| | | | | | Fixes: #163 Adapt unit tests.
* Closes #144Barry Warsaw2015-11-083-1/+42
| | | | | * Fix ``UnicodeEncodeError`` in the hold chain when sending the authorization email to the mailing list moderators. (Closes: #144)
* Clean up pass through abompard's branch.Barry Warsaw2015-10-202-18/+43
|
* Use and interface for the set of header_matchesAurélien Bompard2015-10-201-14/+13
|
* Implement changes from the reviewAurélien Bompard2015-10-202-23/+17
|
* Make sure site-wide header_matches take precedence over list-specific onesAurélien Bompard2015-10-202-8/+45
|
* Adapt the code and the tests to the new HeaderMatch objectAurélien Bompard2015-10-202-5/+6
|
* Handle header-match rule-specific actionAurélien Bompard2015-10-202-2/+39
|
* Fix import order.Barry Warsaw2015-09-231-1/+1
|
* Fix the logging of the moderation reasonsAurélien Bompard2015-09-232-2/+6
|
* Implement reasons for why a message is being held for moderator approval.Barry Warsaw2015-05-112-14/+69
| | | | | | | 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.
* * Remove the admindb url from the template so that the approveAbhilash Raj2015-04-151-1/+1
| | | | | requests no longer have a wrong url * Change the reason for holding the message to 'N/A' from 'XXX'
* Replace add_member() with subscribe() helper.Barry Warsaw2015-03-261-7/+4
|
* * Refactor add_member() so that it uses a RequestRecord namedtuple.Barry Warsaw2015-03-211-2/+5
| | | | | | * RequestRecord contains no password key so these are not part of the held requests database any more. * Pending record contains `email` now instead of `address`.
* Bump copyright years.Barry Warsaw2015-01-0413-13/+13
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-2213-62/+13
|
* app/docs and app.tests all pass now.Barry Warsaw2014-12-151-1/+1
|
* Core tests pass.Barry Warsaw2014-12-151-1/+1
|
* * Improve test coverage a bit.Barry Warsaw2014-11-112-6/+86
| | | | | * Shore up the coverage.ini file. * Fix up Link.__repr__()
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-285-13/+14
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Bump copyright years.Barry Warsaw2014-01-0112-12/+12
|
* Bump copyright years.Barry Warsaw2013-01-0112-12/+12
|
* ConfigurationBarry Warsaw2012-11-041-3/+2
| | | | | | | | | | | | | | | ------------- * `[passlib]path` configuration variable renamed to `[passlib]configuration`. * Postfix-specific configurations in the `[mta]` section are moved to a separate file, named by the `[mta]configuration` variable. * In the new `postfix.cfg` file, `postfix_map_cmd` is renamed to `postmap_command`. Also: * More Python 2.7-isms, use assertMultiLineEqual() directly. * Added external_configuration() and load_external() to mailman.config.config * ConfigLayer does a blanket set of [postfix]postmap_command so subtests generally won't have to.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-311-4/+2
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-029-68/+32
| | | | | | | | | | | | | | | | | | | | | | | The default hash is `sha512_crypt`. * Events renamed and moved: * `mailman.chains.accept.AcceptNotification` * `mailman.chains.base.ChainNotification` * `mailman.chains.discard.DiscardNotification` * `mailman.chains.hold.HoldNotification` * `mailman.chains.owner.OwnerNotification` * `mailman.chains.reject.RejectNotification` changed to (respectively): * `mailman.interfaces.chains.AcceptEvent` * `mailman.interfaces.chains.ChainEvent` * `mailman.interfaces.chains.DiscardEvent` * `mailman.interfaces.chains.HoldEvent` * `mailman.interfaces.chains.AcceptOwnerEvent` * `mailman.interfaces.chains.RejectEvent` * A `ConfigurationUpdatedEvent` is triggered when the system-wide global configuration stack is pushed or popped. * With the switch to `passlib`_, `[passwords]password_scheme` has been removed. Instead use `[passwords]path` to specify where to find the `passlib.cfg` file. See the comments in `schema.cfg` for details.
* General code cleanup.Barry Warsaw2012-04-255-23/+18
| | | | | | | | - 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.
* * Header check specifications in the `mailman.cfg` file have changed quiteBarry Warsaw2012-04-062-59/+181
| | | | | | | | | | | | | | | | | | | | bit. The previous `[spam.header.foo]` sections have been removed. Instead, there's a new `[antispam]` section that contains a `header_checks` variable. This variable takes multiple lines of `Header: regexp` values, one per line. There is also a new `jump_chain` variable which names the chain to jump to should any of the header checks (including the list-specific, and programmatically added ones) match. * Fixed a typo when returning the configuration file's header match checks. (LP: #953497) Also: - Remove an unused method. - Improve test coverage for mailman/app/bounces.py - 100% test coverage for mailman/chains/headers.py - Various other minor code cleanup. - Fixed the 'any' rule, which was checking a bogus metadata dictionary key.
* Add a simple owner processing chain.Barry Warsaw2012-03-223-2/+132
|
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-072-6/+6
| | | | | | | | | | | postings go through the `posting_chain` while messages to owners to through `owners_chain`. The default `built-in` chain is renamed to `default-posting-chain` while the `built-in` pipeline is renamed `default-posting-pipeline`. * Schema changes: - start_chain -> posting_chain - pipeline -> posting_pipeline
* Consistent use of assertMultiLineEqual().Barry Warsaw2012-03-061-3/+2
|
* copybumpBarry Warsaw2012-01-019-9/+9
|
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-301-8/+0
| | | | | | | | | automatically do the right thing in most cases. Keep test_suite() in test_documentation.py since these dynamically set up docs tests properly. Refactor test_passwords.py so that base class tests aren't bogusly run. Also, remove test_membership.py which was essentially disabled because it was testing the MM2 membership API.
* * Local timezone in X-Mailman-Approved-At caused test failure. (LP: #832404)Barry Warsaw2011-08-231-1/+5
|
* * Fix AttributeError triggered by i18n call in autorespond_to_sender()Barry Warsaw2011-08-233-9/+110
| | | | (LP: #827060)
* * Moderating a message with Action.accept now sends the message. (LP: #827697)Barry Warsaw2011-08-221-1/+1
| | | | | | | | | | | Also: * Use utilities.datetime.now() so that moderation related dates are predictable during the test suite. * When a message is accepted, drop it in the pipeline queue. The above bug was caused by the message going in the incoming queue, and then being re-moderated. * Expose mailman.bin.master.Loop in __all__. * Add some helpful debug logging.
* Complete bug 827036 work.Barry Warsaw2011-08-171-0/+0
| | | | | | | | | | | * Add ListCreatingEvent and ListDeletingEvent. These are sent before the operation actually occurs, whereas the previously added ListCreatedEvent and ListDeletedEvent are sent after the operation. Specifically, this is necessary because request database deletion requires the IMailingList object, which is only available before the list is deleted. * Add a handler to clear out the requests database for a mailing list, when the mailing list is about to be deleted.
* Major terminology shift:Barry Warsaw2011-06-011-1/+1
| | | | | | | | | | | | | | | | | * Queue runners are now called just 'Runners' since several of them don't manage queue directories. * Ban the term 'qrunner' too. * The master queue runner watcher should now just be called the 'master' or the 'master runner'. * bin/qrunner -> bin/runner * mailman.qrunner log file -> mailman.runner * master-qrunner.lck -> master.lck * master-qrunner.pid -> master.pid Also: * Remove some obsolete files * Begin the .txt -> .rst renaming
* Reimplement wrap() using modern techniques, and finally get rid of Utils.py!Barry Warsaw2011-03-171-2/+1
|
* Utils.maketext() and Utils.findtext() are gone.Barry Warsaw2011-03-161-15/+18
|
* Move oneline() out of Utils.py.Barry Warsaw2011-02-251-1/+2
|
* Split member and nonmember moderation.Barry Warsaw2011-01-023-19/+77
| | | | | | | | | | | | | | | | * 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-018-8/+8
|
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-293-62/+80
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Clean up from the previous commit.Barry Warsaw2010-12-281-0/+0
| | | | | | * member_moderation_action exposed in IMailingList * REST configuration test for member_moderation_action, send_welcome_msg, and welcome_msg.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-285-2/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-081-3/+3
| | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.