summaryrefslogtreecommitdiff
path: root/src/mailman/app
Commit message (Collapse)AuthorAgeFilesLines
...
* ConfigurationBarry Warsaw2012-11-044-17/+11
| | | | | | | | | | | | | | | ------------- * `[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-313-47/+20
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* DatabaseBarry Warsaw2012-10-163-70/+85
| | | | | | | | | | | | -------- * The `ban` table now uses list-ids to cross-reference the mailing list, since these cannot change even if the mailing list is moved or renamed. Interfaces ---------- * The `IBanManager` is no longer a global utility. Instead, you adapt an `IMailingList` to an `IBanManager` to manage the bans for a specific mailing list. To manage the global bans, adapt ``None``.
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-048-62/+56
| | | | | | | | | | | | | | | now via the RFC 2369 `list_id` instead of the fqdn listname (i.e. posting address). This is because while the posting address can change if the mailing list is moved to a new server, the list id is fixed. (LP: #1024509) + IListManager.get_by_list_id() added. + IListManager.list_ids added. + IMailingList.list_id added. + Several internal APIs that accepted fqdn list names now require list ids, e.g. ISubscriptionService.join() and .find_members(). + IMember.list_id attribute added; .mailing_list is now an alias that retrieves and returns the IMailingList. - list_id added (LP: #1024509)
* * Non-unicode values in msgdata broke pending requests. (LP: #1031391)Barry Warsaw2012-08-171-0/+12
|
* More consistency in the way post-configuration changes are processed. LessBarry Warsaw2012-07-021-1/+10
| | | | | | | | | | magic in the _post_process() method, more ConfigurationUpdatedEvents. More centralization of event initialization. Added property Configuration.language_configs. Instead of initializing events in initialize_2(), initialize them in initialize_1() and do it before the configuration is loaded.
* * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-022-20/+3
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Replace flufl.password with passlib, albeit with a wrapper.Barry Warsaw2012-06-273-10/+8
|
* General code cleanup.Barry Warsaw2012-04-255-16/+13
| | | | | | | | - 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.
* - Module modernatizations (print function).Barry Warsaw2012-04-221-5/+9
| | | | - Convert direct use of config.db global to use the @dbconnection decorator.
* Whitespace normalization.Barry Warsaw2012-04-061-2/+0
|
* * Header check specifications in the `mailman.cfg` file have changed quiteBarry Warsaw2012-04-062-22/+46
| | | | | | | | | | | | | | | | | | | | 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.
* * The `news` runner and queue has been renamed to the more accurate `nntp`.Barry Warsaw2012-03-311-4/+4
| | | | Beta testers can can safely remove `$var_dir/queue/news`.
* Several fixes and cleanups, ostensibly to fix Python 2.6 support.Barry Warsaw2012-03-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | - email.iterators.body_line_iterator() cannot handle unicodes in Python 2.6, because it uses cStringIO.StringIO under the covers, and *that* can't handle unicode. This works fine in Python 2.7, so I override this for the tests only under 2.6 (the code itself isn't affected). - AddressError needs to str() its IAddress attribute explicitly in the __str__() method, otherwise under Python 2.6, you'll get unprintable reprs in the doctests. Again, this works correctly in 2.7, but EIBTI, so it can't hurt either way. - EmailError: a new exception, not related to AddressError. The reason for this it to conform to current nomenclature: "address" means an IAddress while "email" means a text email address. So InvalidEmailAddressError now derives from EmailError instead of AddressError because it gets passed a text email address, and because that is invalid, it never gets turned into an IAddress. The __str__() of this new base exception class does some tricky encoding to keep it compatible between Python 2.6 and 2.7. - UnverifiedAddressError derives from AddressError instead of the more generic MailmanError. - A few random code cleanups are included.
* Merge the Pipermail eradication branch. The scrubber is also removed.Barry Warsaw2012-03-173-16/+8
|\ | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
| * * Pipermail has been eradicated.Barry Warsaw2012-03-161-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
| * Eradicate Pipermail. Everything but the scrubber test works. That will takeBarry Warsaw2012-03-152-11/+2
| | | | | | | | some new APIs I suspect.
* | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-158-51/+53
| | | | | | | | | | | | | | | | | | | | | | "display_name" across the board. * `IMailingList.real_name` -> `IMailingList.display_name` * `IUser.real_name` -> `IUser.display_name` * `IAddress.real_name` -> `IAddress.display_name` * Schema changes: - real_name -> display_name (mailinglist, user, address)
* | * Subscription disabled probe warning notification messages are now sentBarry Warsaw2012-03-144-21/+75
|\ \ | |/ |/| | | without a `Precedence:` header. Given by Mark Sapiro. (LP: #808821)
| * Fixed a logic error and added more conditions to the doctest.Mark Sapiro2012-03-141-0/+38
| |
| * Subscription disabled warnings are now sent without a Precedence:Mark Sapiro2012-03-141-1/+3
|/ | | | header. (LP: #808821)
* * The LMTP server now requires that the incoming message have a `Message-ID`,Barry Warsaw2012-03-133-25/+97
| | | | | | | | | | | otherwise it rejects the message with a 550 error. Also, the LMTP server adds the `X-Message-ID-Hash` header automatically. The `inject` cli command will also add the `X-Message-ID-Hash` header, but it will craft a `Message-ID` header first if one is missing from the injected text. Also, `inject` will always set the correct value for the `original_size` attribute on the message object, instead of trusting a possibly incorrect value if it's already set. The individual `IArchiver` implementations no longer set the `X-Message-ID-Hash` header.
* * Fix `test_moderation` for timezones East of UTC+0000, given by blacktav.Barry Warsaw2012-03-121-3/+4
| | | | (LP: #890675)
* Clean up of style test code, along with refactoring of corner cases toBarry Warsaw2012-03-121-162/+0
| | | | unittests where they belong.
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-072-11/+11
| | | | | | | | | | | 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-064-21/+14
|
* Fix welcome_message_uri to do the placeholder interpolations guaranteed in theBarry Warsaw2012-03-042-3/+33
| | | | | | | | IMailingList documentation. Also: * `ILanguageManager.add()` returns the `ILanguage` object just created.
* Rename the confirmation template, and ensure that we get it via the templateBarry Warsaw2012-03-041-2/+6
| | | | loader.
* * A welcome message is sent when the user confirms their subscription viaBarry Warsaw2012-03-042-3/+11
| | | | | | | | | | email. Also: - The user's Full Name is included on the To line of a welcome message. - Clean up some tests. - The welcome_message_uri for lists using the default style is set to mailman:///welcome.txt so a welcome message is sent by default.
* - Test welcome message notifications.Barry Warsaw2012-03-043-14/+130
| | | | | - welcome.txt is no longer inserted into subscribeack.txt. This latter is renamed to welcome.txt as the default welcome message.
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-034-3/+256
| | | | | | | | | | | | | used in welcome and goodbye messages, and supports both language and mailing list specifications. E.g. mailman:///test@example.com/it/welc.txt * Schema changes: - welcome_msg -> welcome_message_uri - goodbye_msg -> goodbye_message_uri - send_welcome_msg -> send_welcome_message - send_goodbye_msg -> send_goodbye_message * New `ITemplateLoader` utility.
* * Major redesign of the template search system, fixing LP: #788309. $var_dirBarry Warsaw2012-03-031-10/+14
| | | | | | is now used when search for all template overrides, site, domain, or mailing list. The in-tree English templates are used only as a last fallback.
* Restore the RFC 2369 headers to accepted list posts.Barry Warsaw2012-03-011-8/+24
|
* Prevent the `confirm` command from running more than once on the same token.Barry Warsaw2012-03-011-0/+1
| | | | | Also add some debugging to the verification message, IOW, which template is it using (this may be more generally useful, but for now, it's an experiment).
* * The `join` email command no longer accepts an `address=` argument. ItsBarry Warsaw2012-02-291-4/+20
| | | | | | | | | `digest=` argument now accepts the following values: `no` (for regular delivery), `mime`, or `plain`. Also: - Fix get_queue_messages() to properly sort on the string representation of a header, since it could be a Header instance.
* * The `confirm` email command now properly handles `Re:`-like prefixes, evenBarry Warsaw2012-02-261-3/+2
| | | | | | | | | | | | if they contain non-ASCII characters. (LP: #685261) Also: - When the registrar confirms an email address, the verified_on value gets set using the Mailman datetime interface. This simply improves testability for that API. - In Runner._one_iteration(), be sure to commit the database transaction *before* calling _short_circuit().
* * Held messages can now be moderated through the REST API. Mailing listBarry Warsaw2012-01-303-11/+25
| | | | | | | | | | | | | | | resources now accept a `held` path component. GETing this returns all held messages for the mailing list. POSTing to a specific request id under this url can dispose of the message using `Action` enums. * `IRequests` interface is removed. Now just use adaptation from `IListRequests` directly (which takes an `IMailingList` object). * `handle_message()` now allows for `Action.hold` which is synonymous with `Action.defer` (since the message is already being held). * `IListRequests.get_request()` now takes an optional `request_type` argument to narrow the search for the given request. - also, print_function is now a standard __future__ import. The template has been updated, but add this to modules as you edit them.
* A faster implementation of SubscriptionService.get_members().Barry Warsaw2012-01-261-13/+18
|
* * Add property `IUserManager.members` to return all `IMembers` in the system.Barry Warsaw2012-01-261-1/+1
|
* copybumpBarry Warsaw2012-01-0118-18/+18
|
* Replace the password stuff with flufl.password.Barry Warsaw2012-01-012-5/+7
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-061-68/+11
| | | | | | | * Separate out the RFC 2369 header adding handler. * Dynamically calculate the `List-Id` header instead of storing it in the database. This means it cannot be changed. * Be sure to clean out any digest .mmdf files when the world is reset.
* * Fix a couple of spelling errors.Barry Warsaw2011-11-021-1/+1
| | | | | | * Code cleanup (<> -> != ... sigh) * Minor refactoring of database setup code so that touch() is moved to the SQLiteDatabase class; it's not relevant for PostgreSQL.
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-305-46/+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.
* * Implement the style manager as a utility instead of an attribute hangingBarry Warsaw2011-10-242-3/+5
| | | | | | off the `mailman.config.config` object. * Fixed bogus use of `bounce_processing` attribute (should have been `process_bounces`, with thanks to Vincent Fretin. (LP: #876774)
* Finally, all doctests are named .rstBarry Warsaw2011-09-238-0/+0
|
* * Rewrote a test for compatibility between Python 2.6 and 2.7. (LP: #833208)Barry Warsaw2011-09-071-24/+15
|
* * Four new events are created, and notifications are sent during domainBarry Warsaw2011-09-022-1/+44
| | | | | | | | | | lifecycle changes: - DomainCreatingEvent - sent before the domain is created - DomainCreatedEvent - sent after the domain is created - DomainDeletingEvent - sent before the domain is deleted - DomainDeletedEvent - sent after the domain is deleted * Using the above events, when a domain is deleted, associated mailing lists are deleted. (LP: #837526)
* * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-308-64/+246
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and exposed to the REST API as their integer equivalents. They are stored in the database using Storm's UUID type. - ISubscriptionService.get_member() now takes a UUID - IUserManager.get_user_by_id() now takes a UUID * Moderators and owners can be added via REST (LP: #834130). Given by Stephen A. Goss. - add_member() grows a `role` parameter. - ISubscriptionService.join() grows a `role` parameter. * InvalidEmailAddressError no longer repr()'s its value. * `address` -> `email` for consistency - delete_member() - ISubscriptionService.leave() * Fixed typo in app/subscriptions.py __all__ * AlreadySubscribedError: attributes are now public. * More .txt -> .rst renames.
| * LP: #834130 add moderators and owners through REST API w/testsStephen A. Goss2011-08-253-17/+24
|/