summaryrefslogtreecommitdiff
path: root/src/mailman/chains/tests
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Header object test to create the message without cheating.Mark Sapiro2017-05-241-10/+5
|
* Account for msg['subject'] possibly being a Header instance.Mark Sapiro2017-05-241-0/+30
|
* Bump copyright years.Barry Warsaw2017-01-046-6/+6
|
* Fix tests for test-owner instead of moderator's address.Mark Sapiro2016-12-041-2/+2
|
* Minor cleanup and test added.Barry Warsaw2016-11-251-0/+18
|
* Transmit the moderation reason to hold_message()Aurélien Bompard2016-11-251-0/+8
| | | | | | | | The `reason` attribute of `hold_message()` was always None. Serialize the moderation reasons list and pass it to the function. This allows the `reason` attribute in REST to actually contain the moderation reason. It was always blank before.
* Fix the Flake8 ignore tagsAurélien Bompard2016-11-213-3/+3
|
* Closes: #68Barry Warsaw2016-11-131-2/+2
| | | | | Messages sent to the list's moderators now include the actual recipient addresses. Given by Tom Briles.
* Issue 68: send messages to list moderators when tomoderators=TrueTom Briles2016-10-311-3/+8
|
* Tweaks.Barry Warsaw2016-10-221-1/+1
|
* Fixes for #280.Mark Sapiro2016-10-221-0/+40
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-283-8/+8
|
* Fix header match rule suffix inflation.Barry Warsaw2016-05-011-15/+12
| | | | | Given by Aurélien Bompard. Closes #226
* Give predictable names to header match rulesAurélien Bompard2016-05-011-0/+29
| | | | Fixes #226.
* Use flake8-respect-noqa plugin and fix more complaints.Barry Warsaw2016-04-011-1/+1
|
* Don't use `flake8: noqa`.Barry Warsaw2016-04-013-7/+7
| | | | | | | 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.
* Clean up the chains subdirectory.Barry Warsaw2016-03-246-65/+20
|
* Fix cross-posting held on more than one list.Barry Warsaw2016-03-081-0/+35
| | | | | | | | | | | Closes #176 Also: * IMessageStore no longer raises a ValueError if the Message-ID already exists in the store; it just returns None. * The internal handle_message() function no longer takes a `preserve` argument, since messages are never removed from the IMessageStore.
* Refine some coding style.Barry Warsaw2016-02-291-17/+24
| | | | | Slightly rewrite a test so that the event subscribers are more narrow. Opportunistically remove ^L
* Revert "Rename the HeaderMatch.chain column to action"Aurélien Bompard2016-02-291-5/+4
| | | | This reverts commit 703fc135dfcd496a704562ddc263aa0f4f828de9.
* Action-less header matches default to the site-wide antispam actionAurélien Bompard2016-02-291-2/+48
| | | | | Action.defer can't be used on header match links since the 'any' link that jumped to the configuration default happens before header matches.
* Rename the HeaderMatch.chain column to actionAurélien Bompard2016-02-291-4/+5
| | | | It makes it clearer what values are valid, and allows validation.
* The order of a mailing list's header matches is significantAurélien Bompard2016-02-291-9/+9
| | | | | | | Add a numerical index property to HeaderMatch objects, and change the HeaderMatchSet manager to take the order into account. Items can now be inserted and removed by index.
* Use the more convenient API.Barry Warsaw2016-01-251-3/+2
|
* Full coverage of the accept chain.Barry Warsaw2016-01-252-2/+78
| | | | Fix some comments.
* Make creating Link objects a more convenient.Barry Warsaw2016-01-251-6/+6
| | | | | | Link.__init__() can now take an IRule or the string naming a rule, which will be looked up in config.rules. Similarly, it can take an IChain or the name of a chain.
* Several optimizations:Barry Warsaw2016-01-111-1/+17
| | | | | | | | | | | | * Use `yield from` wherever appropriate. * Use SA's .one_or_none() where appropriate. - Fix a bug in MailingList.pass_extensions. - Use ValueError in other places for consistency. - Remove unreached/nonsense code. - Simplify the SubscriptionService.find_member() and .find_members() implementations. - Boost coverage.
* Happy New Year.Barry Warsaw2016-01-025-5/+5
|
* Reject notifications contained no reason.Aurélien Bompard2015-12-121-0/+68
| | | | | | Implement the suggestions from the review. Cleanups by Barry.
* Closes #144Barry Warsaw2015-11-082-0/+36
| | | | | * 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-201-9/+28
|
* Use and interface for the set of header_matchesAurélien Bompard2015-10-201-14/+13
|
* Implement changes from the reviewAurélien Bompard2015-10-201-15/+13
|
* Make sure site-wide header_matches take precedence over list-specific onesAurélien Bompard2015-10-201-2/+38
|
* Adapt the code and the tests to the new HeaderMatch objectAurélien Bompard2015-10-201-4/+5
|
* Handle header-match rule-specific actionAurélien Bompard2015-10-201-0/+32
|
* Fix import order.Barry Warsaw2015-09-231-1/+1
|
* Fix the logging of the moderation reasonsAurélien Bompard2015-09-231-1/+5
|
* Implement reasons for why a message is being held for moderator approval.Barry Warsaw2015-05-111-1/+46
| | | | | | | 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-044-4/+4
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-224-16/+2
|
* * Improve test coverage a bit.Barry Warsaw2014-11-111-0/+80
| | | | | * Shore up the coverage.ini file. * Fix up Link.__repr__()
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-281-1/+2
| | | | | | | | 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-013-3/+3
|
* Bump copyright years.Barry Warsaw2013-01-013-3/+3
|
* 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-022-11/+9
| | | | | | | | | | | | | | | | | | | | | | | 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.
* * Header check specifications in the `mailman.cfg` file have changed quiteBarry Warsaw2012-04-061-0/+126
| | | | | | | | | | | | | | | | | | | | 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-221-0/+75
|