summaryrefslogtreecommitdiff
path: root/src/mailman/rules/tests
Commit message (Collapse)AuthorAgeFilesLines
* Rename metadata key for clarityBarry Warsaw2017-08-041-6/+6
|
* Ensure all holds/rejects have a reason.Mark Sapiro2017-07-2611-3/+415
|
* Added a rule to discard messages with no valid sender address.Mark Sapiro2017-06-301-0/+53
|
* Bump copyright years.Barry Warsaw2017-01-046-6/+6
|
* Make code style review pass.Barry Warsaw2017-01-041-19/+19
|
* Made some argument names more descriptive and consistent.Mark Sapiro2017-01-021-35/+60
| | | | Improved the CNAME tests to provide testable results.
* Some configs moved to [dmarc] section.Mark Sapiro2017-01-011-1/+1
|
* Merge branch 'mr215' into mr215-reviewBarry Warsaw2017-01-011-12/+172
|\
| * Test coverage improvements.Mark Sapiro2017-01-011-12/+175
| | | | | | | | Replaced unreachable statement with assertion.
| * Replaced urllib.request.urlopen() with mailman.utilities.protocols.get().Mark Sapiro2017-01-011-6/+6
| |
* | Add some coverage.Barry Warsaw2017-01-012-1/+13
| | | | | | | | | | | | * parse_suffix_list() can take an optional filename for testing purposes. * Fix a typo. * Add a test.
* | Implement caching suffix list with in-tree fallback.Barry Warsaw2017-01-011-44/+170
|/ | | | | | | | Also: * Change doctest cleanups to be an ExitStack. * Added [dmarc]cache_lifetime setting. * Cleanup pass through dmarc-mitigation.rst. * Be sure the cached org domain file is cleaned up when the world is reset.
* Moved test data from rules/data to rules/tests/data.Mark Sapiro2016-12-313-7/+26
| | | | Get path using pkg_resources.resource_filename.
* Fixed location of 'with' in a test.Mark Sapiro2016-12-311-8/+9
| | | | Removed unneeded 'as' clauses.
* Simplified the org domain mock patch and tweaked a test.Mark Sapiro2016-12-311-17/+11
|
* Small style fixes.Barry Warsaw2016-12-311-2/+25
| | | | | | | * Split the email using .rpartition(). * Use a sentinel singleton for a marker instead of a string. * Move some code out of a try clause and eliminate an else clause for coverage. * Boost coverage by mocking a DNSException.
* Added test data for organizational domains and a mock to use it.Mark Sapiro2016-12-301-10/+39
| | | | Made a few test coverage tweaks.
* Boost coverage.Barry Warsaw2016-12-301-1/+16
|
* Improve coverage for rules/dmarc.py.Barry Warsaw2016-12-301-11/+20
|
* Minor tweaks and coverage:Barry Warsaw2016-12-301-0/+15
| | | | | | | * Format and wrap a comment. * Add a test for having two From: headers. * use <alpha@example.com> as standard Message-ID * Cover URLError case.
* Removed unreachable line from rules/dmarc.py.Mark Sapiro2016-12-301-2/+31
| | | | Added tests to improve coverage.
* Replaced mailman.public with public.public.Mark Sapiro2016-12-091-1/+1
| | | | | Simplified Munge From replacement and added a test for rfc2047 encoded display name.
* Merged from master.Mark Sapiro2016-12-092-0/+92
|\
| * Starting to clean up the branch.Barry Warsaw2016-11-282-10/+6
| |
| * Fix Flake8 errorsAurélien Bompard2016-11-282-15/+2
| |
| * Fix a crash with the suspicious rule and Header instancesAurélien Bompard2016-11-281-0/+52
| |
| * Fix a crash with the no_subject rule and Header instancesAurélien Bompard2016-11-281-0/+57
| |
* | Added mocking of DNS _dmarc lookups and modified test accordingly.Mark Sapiro2016-11-111-0/+81
|/
* Prevent posting from banned addressesAurélien Bompard2016-10-271-0/+119
| | | | Fixes #283
* Minor cleanups, rewording, style.Barry Warsaw2016-05-031-28/+36
|
* Change handling of rules for banned addresses.Aditya2016-05-031-23/+38
| | | | | | | If any of the senders are banned, both the member moderation and nonmember moderation rules return False unconditionally. Add test for the above.
* Add testsAditya2016-05-031-1/+77
|
* Allow fall backs for moderation actions.Barry Warsaw2016-04-011-10/+16
| | | | | | | | | 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-0/+57
| | | | | | | | 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
* First massive round of cleanups.Barry Warsaw2016-03-232-21/+2
| | | | | | | | * 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.
* Protect the approved rule against unknown charsetsAurélien Bompard2016-03-101-5/+24
| | | | Fixes #203
* Happy New Year.Barry Warsaw2016-01-022-2/+2
|
* Fix the approved rule when there is no list passwordAurélien Bompard2015-11-211-0/+6
|
* Do a cleansing pass on abompard's branch.Barry Warsaw2015-06-241-12/+14
|
* Use the *_these_nonmembers properties for moderationAurélien Bompard2015-06-171-0/+37
|
* Implement reasons for why a message is being held for moderator approval.Barry Warsaw2015-05-111-0/+37
| | | | | | | 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-042-2/+2
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-222-8/+1
|
* Trunk merge.Barry Warsaw2014-12-221-0/+33
|\
| * * Fixed messages without a `text/plain` part crashing the `Approved` rule.Barry Warsaw2014-12-031-0/+32
| |\ | | | | | | | | | Given by Aurélien Bompard. (LP: #1158721)
| | * Emails without a text/plain part crash the Approved ruleAurélien Bompard2014-11-301-0/+31
| |/ | | | | | | Fixes: bug #1158721
* / Fix the approved rule. Don't decode the payload so that we get a unicode toBarry Warsaw2014-12-081-5/+5
|/ | | | | | | | search against. This may not be in the long-term best interest because it ignores Content-Transfer-Encoding, however with decode=True it always returns binary data. We may have to decode and then re.search() with a bytes pattern. passlib always returns a unicode password in Python 3, so adjust for that.
* * Fix non-member moderation rule to prefer a member sender if both membersBarry Warsaw2014-03-151-0/+78
| | | | | 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
|