summaryrefslogtreecommitdiff
path: root/src/mailman/utilities (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * When importing from 2.1, handle the archiving policyAurélien Bompard2013-09-202-0/+41
| |
* | Sort imports.Barry Warsaw2013-10-181-1/+1
| |
* | * Fix importation from MM2.1 to MM3 of the archive policy. Given by AurélienBarry Warsaw2013-10-182-0/+68
|/ | | | Bompard. (LP: #1227658)
* Switch to PEP 435 enums from flufl.enums.Barry Warsaw2013-06-181-0/+2
|
* whitespaceBarry Warsaw2013-03-201-1/+0
|
* Bump copyright years.Barry Warsaw2013-01-0116-16/+16
|
* LP: #975692 phase 1Barry Warsaw2012-12-281-0/+53
| | | | | | | | | | | | | | | | | * Rework list style management. No more style priorities or matching.. Now, you name a style explicitly to apply and that's it. * create_list() now takes a `style` argument. * config file now names both a default style to use, and a set of paths to scan for IStyle instances. (This could be a model for other plugins.) * added IMailingList.style_name to record the last style applied, but this is going to be removed in subsequent revisions. Also: * Move find_components() and scan_module() from app/finder.py to utilities/modules.py * Cleaned up lifecycle.rst for better documentation. Some tests moved to test_lifecycle.py. * Remove some unnecessary test tearDown() code.
* * A user's password can be verified by POSTing to .../user/<id>/login. TheBarry Warsaw2012-12-261-0/+4
| | | | | | data must contain a single parameter `cleartext_password` and if this matches, a 204 (No Content) will be returned, otherwise a 403 (Forbidden) is returned. (LP: #1065447)
* Fix the order of PasswordContext.verify() to match that of passlib.Barry Warsaw2012-12-251-4/+23
|
* ConfigurationBarry Warsaw2012-11-042-10/+3
| | | | | | | | | | | | | | | ------------- * `[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-312-19/+3
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-041-1/+1
| | | | | | | | | | | | | | | 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)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-262-7/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-4/+5
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * trunk mergeBarry Warsaw2012-07-062-0/+122
| |\ | |/ |/|
* | More consistency in the way post-configuration changes are processed. LessBarry Warsaw2012-07-021-9/+2
| | | | | | | | | | | | | | | | | | | | 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-23/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-0/+57
| |
| * - Rename the model attributes.Barry Warsaw2012-04-081-2/+2
|/ | | | - news_moderation -> newsgroup_moderation
* ArchitectureBarry Warsaw2012-03-261-5/+42
| | | | | | | | | | | | | | | | | | | ------------ * 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.
* Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-152-4/+5
| | | | | | | | | | | "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)
* Move the interact module to a better sub-package location.Barry Warsaw2012-03-131-0/+86
|
* * The LMTP server now requires that the incoming message have a `Message-ID`,Barry Warsaw2012-03-132-3/+105
| | | | | | | | | | | 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.
* - Test welcome message notifications.Barry Warsaw2012-03-042-21/+21
| | | | | - welcome.txt is no longer inserted into subscribeack.txt. This latter is renamed to welcome.txt as the default welcome message.
* * Major redesign of the template search system, fixing LP: #788309. $var_dirBarry Warsaw2012-03-032-183/+200
| | | | | | 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.
* copybumpBarry Warsaw2012-01-0113-13/+13
|
* Replace the password stuff with flufl.password.Barry Warsaw2012-01-012-593/+0
|
* * 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-56/+7
| | | | | | | | | 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.
* * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-301-7/+7
| | | | | | | | | | | | | | | | | | 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.
* Remove all pylint vestiges.Barry Warsaw2011-08-031-3/+0
|
* * The IMailingList attribute ``host_name`` has been renamed to ``mail_host``Barry Warsaw2011-06-163-5/+14
| | | | | for consistency. This changes the REST API for mailing list resources. (LP: #787599)
* Add non-English tests of the probe message.Barry Warsaw2011-05-081-5/+24
|
* checkpointingBarry Warsaw2011-05-061-3/+2
|
* * Fix setup.py version regexp.Barry Warsaw2011-05-031-16/+14
| | | | | | * Move get_verp() to class-based for easy overridding. Hook up StandardVERP but not yet ProbeVERP. * Use uuid.uuid4() to get unique id.
* Start the enablement of bounce detection.Barry Warsaw2011-05-012-0/+90
| | | | | | | | | | * Move VERP header extraction to mailman.app.bounces, and ports the implementation to the get_verp() function. * Restore the [mta] verp_regexp value which got lost along the way. * Move mailman.email.utils to mailman.utilities.email and add a test for split_email() * Move specialized_message_from_string() from test_documentation to mailman.testing.helpers.
* Checkpointing for refactoring.Barry Warsaw2011-04-271-1/+0
|
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-221-7/+18
| | | | | | | | | | | | | | | | | | | | | | | path at the root of the resource tree (i.e. /members/X) and because when members can be subscribed by their IUser record (for preferred address), their canonical location cannot contain the address they are subscribed with. When their preferred address changes (without otherwise touching their membership), this address will change and that's not good for a canonical location. Other changes: * Added IMember.member_id attribute * Added ISubscriptionService.get_member() so member records can be retrieve by member id. * We can now get individual members by id via the REST API. * Extend the UniqueIDFactory so that it can take a 'context' (defaulting to None). The context is only used in the testing infrastructure so that separate files can be used for user ids and member ids. Otherwise, we'd have gaps in those sequences. * When *not* in testing mode, ensure that UIDs cannot be reused by keeping a table of all UIDs ever handed out. We *should* never get collisions, but this ensures it. * Clean up mailman.sql
* Fix initialization of lock object.Barry Warsaw2011-04-081-7/+11
|
* Merge passwords into restBarry Warsaw2011-04-082-2/+73
|\
| * encrypt_password(): New convenience function for ensuring that a password isBarry Warsaw2011-04-082-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both encrypted according to a scheme, and a bytes object. add_member(): Use encrypt_password(). cli_members: Give the user a default, user-friendly password. Of course, this will be encrypted so it can't be retrieved, but it can be reset. Passwords are stored as bytes objects, not unicode now. ConfigLayer: Set the default test password scheme to cleartext. General test repair.
* | Merge passwords into restBarry Warsaw2011-04-072-0/+73
|\|
| * make_user_friendly_password(): Ported from Mailman 2.1.Barry Warsaw2011-04-072-0/+73
| |
* | More fleshing out of the users REST API.Barry Warsaw2011-04-042-14/+52
|/ | | | | | | | | | | | | | * Add a 'uid factory' which allows us to return predictable unique ids for various testing purposes, e.g. user ids. This should work even in the case of cross-subprocess uid generation. * REST access to individual users, or the set of all users. * User objects now have a created_on attribute. * Users can be created through the web, but must have an email address. * Add a [devmode] 'testing' variable for communicating to qrunner subprocesses that we're running in testing mode. This allows us to coordinate factories and such in the qrunner processes. * layers.is_testing() for more consistent API. * Give AddressError a .address attribute for better diagnostics.
* * Re-organize the interface between buildout.cfg and the zope.testing layerBarry Warsaw2011-04-012-4/+74
| | | | | | | | | | | | | | | | | | | initialization. buildout.cfg is now really simple; it calls one method. That method does all the relevant layer initializations. This better localizes what has to be set up before testing can even begin. * IUsers now have a created_on property which contains the datetime at which the user record was created. * Rework the date and uid factories so that they consult the MockAndMonkeyLayer for the current testing flag. Also, those factories register themselves with the layer so that they'll get automatically reset between tests, without the layer actually having to know about them. * Move the User model object initialization into User.__init__() from the user manager. The User now also adds itself to the store. * Add a 'uid factory' for unique id creation, which is test suite aware.
* Reimplement wrap() using modern techniques, and finally get rid of Utils.py!Barry Warsaw2011-03-174-14/+246
|
* Update comment.Barry Warsaw2011-03-161-1/+5
|
* Utils.maketext() and Utils.findtext() are gone.Barry Warsaw2011-03-162-9/+4
|
* make() and some tests.Barry Warsaw2011-03-162-4/+113
|
* Checkpointing migration of findtext() and maketext() out of Utils.py. TestsBarry Warsaw2011-03-162-15/+254
| | | | added. TODO: flesh out make().