summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces
Commit message (Collapse)AuthorAgeFilesLines
...
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-264-13/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ArchivePolicy. This describes the three states of never archive, archive privately, and archive_publicly. (LP: #967238) Database -------- * Schema migrations (LP: #971013) - include_list_post_header -> allow_list_posts - news_prefix_subject_too -> nntp_prefix_subject_too - news_moderation -> newsgroup_moderation - archive and archive_private have been collapsed into archive_policy. - nntp_host has been removed. * The PostgreSQL port of the schema accidentally added a moderation_callback column to the mailinglist table. Since this is unused in Mailman, it was simply commented out of the base schema for PostgreSQL.
| * Working for SQLite:Barry Warsaw2012-07-251-3/+7
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * The final bit of refactoring puts the specifics of making a temporary databaseBarry Warsaw2012-07-251-13/+6
| | | | | | | | into the hands of the database modules, by using ZCA adapters.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-251-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | production database. - Add an IDatabaseFactory interface with two named utility implementations. The initialization subsystem will either ask for the 'testing' or 'production' factory utility depending on whether we're in the test suite or not. The testing factory returns an IDatabase that can be _reset(). - initialize_2() now takes an optional `testing` argument, defaulting to False. The test ConfigLayer will pass in True. - Remove _reset() from the base database class. - The ModelMeta now adds a PRESERVE attribute to database classes. This defaults to False, meaning by default the test framework will reset the table. The Version table is preserved because it records the schema migrations. - Because of the above, we no longer need to support pre_reset() and post_reset() on migrations. Also, bin/mailman should allow the standard configuration file search algorithm to be used except when -C/--config is given.
| * Checkpointing Postgres port of test suite.Barry Warsaw2012-07-231-0/+13
| | | | | | | | | | | | | | | | | | - Refactor load_schema() into a separate load_sql() method. - Add API for test suite to make a temporary database. - Add code to migrate the PostgreSQL database. - Comment out `moderation_callback` from the PostgreSQL SQL; this must have snuck in accidentally via the contributed port. - Refactor test_migrations.py
| * trunk mergeBarry Warsaw2012-07-064-2/+96
| |\ | |/ |/|
* | * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-022-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * When a queue runner gets an exception in its _dispose() method, aBarry Warsaw2012-05-111-0/+13
| | | | | | | | | | | | `RunnerCrashEvent` is triggered, which contains references to the queue runner, mailing list, message, metadata, and exception. Interested parties can subscribe to that `zope.event` for notification.
* | Update the IDatabase interface.Barry Warsaw2012-04-221-2/+5
| |
| * - Rename the model attributes.Barry Warsaw2012-04-082-2/+12
| | | | | | | | - news_moderation -> newsgroup_moderation
| * - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-0/+8
|/ | | | | | | | | | | | | | | can be tested separately. - Add an `until` argument to load_migrations() so that we can load only up to a given timestamp. - In load_migrations(), ignore files in which the `version` part of the file name is empty. - In migrations.rst, use the new, better way of ensuring post-test cleanup. - Add tests for partial upgrades. - LP: #971013 - schema migrations for beta 2. - LP: #967238 - IMailingList.archive + IMailingList.archive_private -> IMailingList.archive_policy, and add ArchivePolicy enum. - Move the `chdir` context manager to helpers.py and add `temporary_db` context manager.
* * A `PasswordChangeEvent` is triggered when an `IUser`'s password changes.Barry Warsaw2012-04-072-1/+15
| | | | (LP: #975700)
* * An `AddressVerificationEvent` is triggered when an `IAddress` is verifiedBarry Warsaw2012-04-071-0/+15
| | | | or unverified. (LP: #975698)
* * Header check specifications in the `mailman.cfg` file have changed quiteBarry Warsaw2012-04-061-4/+4
| | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | Beta testers can can safely remove `$var_dir/queue/news`.
* ArchitectureBarry Warsaw2012-03-261-0/+9
| | | | | | | | | | | | | | | | | | | ------------ * Internally, all datetimes are kept in the UTC timezone, however because of LP: #280708, they are stored in the database in naive format. * `received_time` is now added to the message metadata by the LMTP runner instead of by `Switchboard.enqueue()`. This latter no longer depends on `received_time` in the metadata. * The `ArchiveRunner` no longer acquires a lock before it calls the individual archiver implementations, since not all of them need a lock. If they do, the implementations must acquire said lock themselves. Configuration ------------- * New configuration variables `clobber_date` and `clobber_skew` supported in every `[archiver.<name>]` section. These are used to determine under what circumstances a message destined for a specific archiver should have its `Date:` header clobbered.
* Add an owner chain and pipeline to the schema, model, and interface. PlumbBarry Warsaw2012-03-221-1/+19
| | | | this through the incoming runner.
* Several fixes and cleanups, ostensibly to fix Python 2.6 support.Barry Warsaw2012-03-222-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | - 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-174-18/+17
|\ | | | | | | | | | | | | | | | | | | | | | | * 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-163-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | * 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-151-17/+4
| | | | | | | | some new APIs I suspect.
* | * Add property `IRoster.member_count`.Barry Warsaw2012-03-151-0/+3
| | | | | | | | | | Also, change the implementation of mailing list REST resource's member_count to use the more efficient implementation of IRoster.member_count.
* | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-156-27/+25
|/ | | | | | | | | | | "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)
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-071-3/+12
| | | | | | | | | | | 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
* Template indirection now also in effect for regular and digest headers andBarry Warsaw2012-03-041-26/+145
| | | | | | | | | | | | footers, using the same semantics and algorithm as for welcome and goodbye messages. Additional schema changes: - msg_header -> header_uri - msg_footer -> footer_uri - digest_header -> digest_header_uri - digest_footer -> digest_footer_uri
* Fix welcome_message_uri to do the placeholder interpolations guaranteed in theBarry Warsaw2012-03-041-0/+2
| | | | | | | | IMailingList documentation. Also: * `ILanguageManager.add()` returns the `ILanguage` object just created.
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-032-0/+102
| | | | | | | | | | | | | 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.
* * The `join` email command no longer accepts an `address=` argument. ItsBarry Warsaw2012-02-291-1/+4
| | | | | | | | | `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.
* * Schema migrations have been implemented.Barry Warsaw2012-02-121-15/+0
|
* * Held messages can now be moderated through the REST API. Mailing listBarry Warsaw2012-01-301-14/+5
| | | | | | | | | | | | | | | 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.
* * `IMailTransportAgentAliases` now explicitly accepts duck-typed arguments.Barry Warsaw2012-01-271-0/+14
| | | | - Also, rewrite the Postfix alias generator to use the faster, duck-typed API.
* * Remove previously deprecated `IListManager.get_mailing_lists()`.Barry Warsaw2012-01-271-7/+0
|
* * Add property `IListmanager.name_compoments` which returns 2-tuples forBarry Warsaw2012-01-271-0/+4
| | | | every mailing list as (list_name, mail_host).
* * Add property `IUserManager.members` to return all `IMembers` in the system.Barry Warsaw2012-01-261-0/+3
|
* copybumpBarry Warsaw2012-01-0137-37/+37
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-061-3/+0
| | | | | | | * 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.
* * Implement the style manager as a utility instead of an attribute hangingBarry Warsaw2011-10-241-1/+1
| | | | | | 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)
* Improved the way flufl.enum.Enums are stored in the database. Now, theyBarry Warsaw2011-09-231-1/+7
| | | | | | | | should always be stored as INTEGER columns, with the enum class explicitly described in the code. This should be more efficient, and besides EIBTI. Also, filled in a few additional IMailingList attributes which were not documented in the interface.
* * Preferences for addresses, users, and members can be accessed, changed, andBarry Warsaw2011-09-232-5/+7
| | | | | | deleted through the REST interface. Hierarchical, combined preferences for members, and system preferences can be read through the REST interface. (LP: #821438)
* * Four new events are created, and notifications are sent during domainBarry Warsaw2011-09-021-0/+32
| | | | | | | | | | 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)
* * New REST resource http://.../<domain>/lists can be GETed in order to findBarry Warsaw2011-08-301-0/+3
|\ | | | | | | | | all the mailing lists in a specific domain (LP: #829765). Given by Stephen A. Goss.
| * merged changes to main branchStephen A. Goss2011-08-231-19/+19
| |\
| * | some tweaks to fix for LP: 829765 based on feedbackStephen A. Goss2011-08-232-7/+2
| | |
| * | REST API: add listing of mailing lists per domainStephen A. Goss2011-08-191-0/+7
| | |
* | | * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-305-15/+23
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-1/+3
|/ /
* / Rename IDomain.email_host to .mail_host for consistency. Similarly in theBarry Warsaw2011-08-221-19/+19
|/ | | | REST API. (LP: #831660)
* Complete bug 827036 work.Barry Warsaw2011-08-171-0/+16
| | | | | | | | | | | * 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.
* Basic infrastructure for fixing bug 827036.Barry Warsaw2011-08-171-1/+1
| | | | | | | | | * Use zope.events to signal when a mailing list has been created or deleted. * Register a handler for the ListDeletedEvent which cleans up member subscriptions. * Relax the criteria for find_members(), both internally and in the REST API, so that the subscriber is not required. E.g. you can now find all members of a mailing list.
* Send event notifications whenever a mailing list is created or deleted.Barry Warsaw2011-08-161-0/+16
|