summaryrefslogtreecommitdiff
path: root/Mailman/docs
Commit message (Collapse)AuthorAgeFilesLines
* Bite the bullet: rename the Mailman package to mailman.Barry Warsaw2008-02-2718-3406/+0
|
* The start of a cleaning up of Errors.py. Eventually, I want to get rid ofBarry Warsaw2008-02-191-1/+1
| | | | | | | | | this module, in favor of moving exceptions into the interface modules that they are appropriate for. For now, this is just the low-hanging fruit. Along the way, clean up by reSTifying some interfaces and implementations.
* Added a test for the built-in pipeline. Fixed some broken handler names inBarry Warsaw2008-02-171-0/+174
| | | | | | | | | | | | | the built-in pipeline. Fixed DEFAULT_SUBJECT_PREFIX to take $-names instead of %-names, although I'm not entirely sure the %%d stuff still works (we need a test for this). Added IMailingList.real_name attribute and added this to the default style. A column for this was in the database but not in the storm object. Also re-enabled the style's subject_prefix attribute. Moved some of the digest test functions into Mailman.tests.helpers.
* Rename 'prep queue' to 'pipeline queue'.Barry Warsaw2008-02-081-5/+5
| | | | Add a pipeline queue runner.
* Reorganize doctests, moving handler documentation into Mailman/handlers/docs.Barry Warsaw2008-01-2418-3462/+0
| | | | Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
* Python 2.5's email package uses cStringIO in its feed parser, and this doesn'tBarry Warsaw2008-01-2413-69/+69
| | | | | | | support unicode. Although this never bit me on OS X (Leopard) it matters greatly on Linux (Ubuntu) where you get lots of test failures because of it. So instead, just use 8-bit string in message_from_string(). Everything works fine still.
* Convert IncomingRunner to use the new chains disposition architecture. moveBarry Warsaw2008-02-025-533/+1
| | | | | | | | | | | | | | | | | | | | | | the big explanatory text at the beginning of incoming.py to a doctest called OVERVIEW.tt (which doesn't actually contain any tests yet -- it's documentation though). Added a doctest for the incoming runner, though this will be fleshed out in more detail next. Mailman.Post renamed to Mailman.inject, and simplified. We don't need its command line script behavior because that is now handled by bin/inject. Add a 'start_chain' attribute to mailing lists. This names the chain that processing of messages for that list begins with. We were inconsistent in the use of the 'no reply' address attribute. It's now always 'no_reply_address'. Update the smtplistener helper with lessons learned about how to suppress bogus asyncore error messages. Also, switch to using a maildir mailbox instead of an mbox mailbox.
* SpamDetect is gone, so the chains/rules implementation experiment is deemed aBarry Warsaw2008-02-011-3/+0
| | | | | | | | | | | | | | | | | | | | success and will now be merged into the trunk. Move the Truth rule into the built-in rules package in a separate module, and add a test. Modify IChainLink so that the rule and chain attributes are not names but indeed the actual ILink or IChain object directly. Update the chains.process() function accordingly. Remove the IChain.get_rule() method. Don't derive BuiltInChain from Chain and don't make it an IMutableChain. It's now just an IChain, and is implemented concretely. Refactor the HeaderMatchChain and friends so that it can be used with both the global HEADER_MATCHES variable and the list-specific header_matches variable, which has exactly the same semantics. Oh yeah, get rid of the list's header_filter_rules attribute and replace it with header_matches so that the semantics match, it's easy to explain, and it's all nice and clean.
* Port header matching previously described by the misnamed KNONW_SPAMMERSBarry Warsaw2008-01-262-80/+7
| | | | | | | | | | | | | | | variable to the new chain processing system. Create a header-matching chain which handles global site header matching rules defined by HEADER_MATCHES. Rip this logic out of the SpamDetect handler; really this entire handler needs to go away but the rest of it isn't ported yet. IChains now have a get_rule() method which allows them to return private (i.e. not globally registered) rules. This is used by the header matching chain. Mailman.app.chains.process() has had its parameter list reordered to be more like all other function signatures that take a mailing list, message, and message metadata.
* More changes to rules and chains.Barry Warsaw2008-01-231-4/+7
| | | | | | | | | | | | | Now a link has a rule, action, chain, and function, not all of which needs to be specified. The action is a LinkAction enum adn specifies what to do should the rule match. The use of the chain or function depends on what the action is. Several interface changes now make it easier to jump to other chains, push (i.e. detour) to chains, etc. Rules can also now specify that they should not be recorded in X-* headers. Added a TruthRule which always matches.
* More updates to rules and chains, especially by adding additional tests.Barry Warsaw2008-01-213-224/+339
| | | | | | | | | | | | | | | - Remove the Emergency.py handler. This is now covered by the emergency.py rule. - Remove the hold.txt doctest. This is now covered by the chains.txt and emergency.txt doctests. - Added a chains.txt doctest. - Extend the pending db to handle list values, although only lists that contain nothing but strings. - Rename the 'adminapproved' message metadata key (for the emergency rule) to 'moderator_approved'. Also, backport a change to the Decorate handler where message metadata on the 'decoration-data' key ca be used in the header and footer.
* Merge from trunk.Barry Warsaw2008-01-142-8/+21
|\
| * Add an interface IArchiver which is used to calculate urls and send messagesBarry Warsaw2008-01-132-8/+21
| | | | | | | | | | | | | | | | | | | | to the archiver. Also add a plugin architecture for easily overriding the archiver, and hook this into the setup.py script. Updated CookHeaders.py and Scrubber.py handlers to use the plugged archiver. Updated doctests as appropriate. Fix a typo in the setup.py file.
* | Extended test_documentation.py to be able to find doctests in subdirectoriesBarry Warsaw2008-01-0111-1077/+0
| | | | | | | | | | | | called 'docs' anywhere under the Mailman package. Change the rule API to return rule classes not instances. Added the ChainJump enum, though this will likely change soon.
* | Add three new rules and their associated doctests.Barry Warsaw2007-12-302-0/+106
| | | | | | | | | | | | | | | | | | - A rule that checks to see if the sender is a moderated member. - A rule that checks to see if the sender is a non-member. - A rule that checks to see if the message has no (or an empty) Subject. Give IMembers (and the associated database implementation) an `is_moderated` flag.
* | Move the suspicious header check to a rule and add a doctest.Barry Warsaw2007-12-292-37/+37
| |
* | Add a rule and doctest for newsgroup moderation.Barry Warsaw2007-12-291-0/+38
| |
* | Port the maximum message size check to a rule. Add doctest.Barry Warsaw2007-12-293-23/+42
| | | | | | | | | | | | | | | | Rename the implicit.txt doctest. specialized_message_from_string(): Mimic the way the text->message parser will include the size of the original text as an attribute on the message object. The maximum message size rule will use this information.
* | Port the implicit destination checking to the rules infrastructure and add aBarry Warsaw2007-12-292-198/+239
| | | | | | | | | | | | bunch of doctests. Note that the old Hold Notification tests are temporarily disabled as these will have to be rewritten when the rule matching logic gets added.
* | Convert the max-recipients check from the Hold handler to the max_recipientsBarry Warsaw2007-12-292-23/+42
| | | | | | | | rule. Add doctest as appropriate.
* | Convert the administrivia check from the Hold handler to the administriviaBarry Warsaw2007-12-292-21/+101
| | | | | | | | | | | | rule. Add doctest as appropriate. DEFAULT_MAIL_COMMANDS_MAX_LINES -> EMAIL_COMMANDS_MAX_LINES
* | Add a rule to search for posting loops.Barry Warsaw2007-12-291-0/+50
| |
* | Convert the Approve.py handler to an approved.py rule. Update the doctest toBarry Warsaw2007-12-291-128/+188
| | | | | | | | | | | | | | | | | | use the rule check instead of handler processing. Add a test for stripping the header from the text/html part to the doctest. Add Mailman.app.rules.find_rule() to return a named rule. Fix a few typos.
* | Change IRuleProcessor to IRuleSet. Plugins now provide only sets of rules,Barry Warsaw2007-12-271-28/+27
| | | | | | | | | | | | they do not do the actual rule processing. That's left up to Mailman. Further, the rule processor can be given a list of rules to run; those will be the only ones run.
* | First cut at a rules processor, separate from the disposition of rule hits.Barry Warsaw2007-12-271-0/+112
|/ | | | | | | | | | | | | | The basic idea is that we process rules on a mlist, message, metadata triplet making a list of all rules that hit. Then a different part of the system will decide on the disposition of a message based on which rules hit and their priority. The doctest and plugin architecture is in place, including the tie-in to setup.py. Ported the first rule -- emergency.py -- to the new rule processor. We no longer need SQLAlchemy as a requirement, and the setuptools/bzr plugin name has changed.
* Add .get() to our Message subclass, which ensures that returnedBarry Warsaw2007-12-104-89/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | values are unicodes if they come from the base class as a string. Get rid of the 'global id'. Now use just Message-ID. Rename X-List-ID-Hash to X-Message-ID-Hash. Do not take Date header into account when calculating this hash. Because of the above change, the assumption is that there will be no Message-ID collisions. Therefore, get rid of IMessageStore .get_message(), .get_messages_by_message_id() and .get_messages_by_hash(). Instead, it's now .get_message_by_id() and .get_message_by_hash() both of which return the message object or None. Message.hash -> Message.message_id_hash When storing a message in the message store, the final path component has the entire hash, not just the leftover parts after directory prefix splitting. MessageStore.delete_message() deletes the file too. Doctests clean up message store messages though the message store instead of directly off the filesystem.
* Complete the port to Storm, at least as far as the current Mailman test suiteBarry Warsaw2007-11-174-91/+91
| | | | | is concerned. This still requires a minor patch to Storm to handle timedelta types in SQLite.
* All the simple test fixes are now in, and while there are still some failingBarry Warsaw2007-11-1010-49/+55
| | | | | | tests, we're making very good progress. Just the tough ones are left. This change did modify the the schema a bit, for better naming and typing. E.g. 'type' -> 'request_type' and using a RawStr for a hash type.
* More Unicodification; fixed several more doctests.Barry Warsaw2007-11-088-115/+115
|
* More Unicodification; fixed two more doctests.Barry Warsaw2007-11-089-180/+103
|
* Two more passing tests.Barry Warsaw2007-11-082-57/+41
|
* More doctest fixes.Barry Warsaw2007-11-083-41/+41
|
* Fix two more doctestsBarry Warsaw2007-11-0723-289/+104
|
* Fix two more doctestsBarry Warsaw2007-11-072-14/+9
|
* Fix two doctests: addresses.txt and mlist-addresses.txtBarry Warsaw2007-11-072-64/+52
| | | | | Remove flush() altogether. Yee-haw! Rework queries to be Stormy. Fix doctests to be Unicode-ish.
* Fix two doctests: ack-headers and acknowledgment.Barry Warsaw2007-11-061-40/+23
| | | | | | | | | | | | | | | | | | | This hacks around an apparent bug in the email package where if you parse a unicode message string, you still end up getting 8-bit strings out of the headers, and probably payloads. The hack is to override Mailman.Message.Message.__getitem__() to force the header value returned to a Unicode. It must be ASCII but this is required anyway by RFC 2822. It's not perfect, but it lets us get farther without forcing a detour into fixing the email package. Other changes: - Fix the Address table's references, and also update the subscribe() query. - Fix the Member table's references and add a __init__(). - Fix Roster's get_member() query. - Fix the Enum class's variable_class attribute. - UserManager.create_user() has to use Unicodes for real_name.
* Target Mailman onto the Storm <http://storm.canonical.com> Python ORM. ThisBarry Warsaw2007-11-041-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enables a few interesting things: 1. It makes it easier to do our "pillars of storage" idea, where list data and messages could live in one database, but user information live in a separate database. 2. It reduces the number of moving parts. SQLAlchemy and Elixir can both go away in favor of just one database layer. 3. No more Unicode/string mush hell. Somewhere along the way the upgrade to SQLAlchemy 0.4 and Elixir 0.4 made the strings coming out the database sometimes Unicode and sometimes 8-bit. This was totally unpredictable. Storm asserts that if a property is declared Unicode, it comes in and goes out as Unicode. 4. 'flush' is gone. One cost of this is that Storm does not yet currently support schema generation. So I cheat by dumping the trunk's SQLite schema and using that as a starting place for the Storm-based schema. I hope that Storm will eventually address this. Other related changes include: - SQLALCHEMY_ENGINE_URL is renamed to DEFAULT_DATABASE_URL. This may still get changed. Things I still want to fix: - Ickyness with clearing the databases. - Really implement multiple stores with better management of the Store instances. - Fix all the circular import nasties.
* Much progress, though not perfect, on migrating to SQLAlchemy 0.4 and ElixirBarry Warsaw2007-10-313-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0.4. Lots of things changes, which broke lots of our code. There are still a couple of failures in the test suite that I don't understand. It seems that for pending.txt and requests.txt, sometimes strings come back from the database as 8-bit strings and other times as unicodes. It's impossible to make these tests work both separately and together. users.txt is also failing intermittently. Lots of different behavior between running the full test suite all together and running individual tests. Sigh. Note also that actually, Elixir 0.4.0 doesn't work for us. There's a bug in that version that prevented zope.interfaces and Elixir working together. Get the latest 0.4.0 from source to fix this. Other changes include: - Remove Mailman/lockfile.py. While I haven't totally eliminated locking, I have released the lockfile as a separate Python package called locknix, which Mailman 3.0 now depends on. - Renamed Mailman/interfaces/messagestore.py and added an IMessage interface. - bin/testall raises turns on SQLALCHEMY_ECHO when the verbosity is above 3 (that's three -v's because the default verbosity is 1). - add_domain() in config files now allows url_host to be optional. If not given, it defaults to email_host. - Added a non-public interface IDatabase._reset() used by the test suite to zap the database between doctests. Added an implementation in the model which just runs through all rows in all entities, deleting them. - [I]Pending renamed to [I]Pended - Don't allow Pendings.add() to infloop. - In the model's User impelementations, we don't need to append or remove the address when linking and unlinking. By setting the address.user attribute, SQLAlchemy appears to do the right thing, though I'm not 100% sure of that (see the above mentioned failures).
* Remove the action.py module, move this to Mailman/interfaces/__init__.py.Barry Warsaw2007-10-103-2/+83
| | | | | | Convert IMailingList.personalize to a enum. Change all non-obsolete occurances of GetListEmail() to posting_address.
* Reorganize the enums so that they live in the most appropriate interface. TheBarry Warsaw2007-10-098-14/+18
| | | | only constant left in Mailman.constants is now actually a constant.
* Changes to support the Approved/Approve header with the new userBarry Warsaw2007-10-061-0/+418
| | | | | | | | | | model. Specifically, where a mailing list used to have both a password and a moderator password, both of which could be used in the Approved header, now a mailing list has only a shared moderator password. This moderator password's only purpose in life is to allow for Approved header posting. test_handlers.py is now completely ported to doctests, so it's removed.
* Reorganize the qrunner infrastructure. First, the package has been renamedBarry Warsaw2007-09-2916-21/+20
| | | | | | | | | | | | | | | | | | | | | | from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8 compliant). The Switchboard and Runner classes have been moved into the package __init__.py and the previous class modules have been removed. The switchboard cache is removed; I don't think it was ultimately buying us much. Now, just import the Switchboard class and instantiate it directly. Added an IRunner interface. Renamed the ArchRunner to ArchiveRunner. bin/qrunner and bin/mailmanctl are updated accordingly. For the former, it no long accepts -r=All to run all qrunners. You can still use the short name (e.g. --runner=incoming) to run the built-in queue runners, but this design will eventually allow for plugin qrunners by allowing them to be run specifying the full package path to the class. It also now accepts a leading dot to indicate a qrunner class relative to the Mailman.queue package.
* Repair the test suite.Barry Warsaw2007-09-272-9/+0
|
* OMGW00T: After over a decade, the MailList mixin class is gone! Well,Barry Warsaw2007-09-218-16/+12
| | | | | | | | | | | | mostly. It's no longer needed by anything in the test suite, and therefore the list manager returns database MailingList objects directly. The wrapper cruft has been removed. To accomplish this, a couple of hacks were added to the Mailman.app package, which will get cleaned up over time. The MailList module itself (and its few remaining mixins) aren't yet removed from the tree because some of the code is still not tested, and I want to leave this code around until I've finished converting it.
* InitTempVars() is completely eradicated. The only bit I think weBarry Warsaw2007-09-193-9/+2
| | | | | | | | | | | | | | | | | still need temporarily is the _gui component initialization, so this has been moved into MailList.__init__(). Fixed the __getattr__() super call to properly dispatch up. Removed the _memberadaptor instance variable initialization. The whole MemberAdaptor stuff is next on the chopping block. Essentially MailList locking is gone too now, although it's not yet completely eradicated. However, the __repr__() no longer states the lock status. The full_path property is now just an attribute on the underlying MailingList database object.
* Finish clean up of ListAdmin class removal. Start by actuallyBarry Warsaw2007-09-162-40/+27
| | | | | | | | | | | | | | | removing the module. Then, fix a few tests that failed as a result of this work. Mailman/Handlers/Hold.py: Call hold_message() instead of mlist.HoldMessage(). The message store also no longer requires a Date: header, so clean up a few tests that were still expecting that. Extend cleaning_teardown() in test_documentation.py so that both the message store and any list-centric requests are cleaned up after each test.
* Finish up the request hold conversion. ListAdmin can go away thoughBarry Warsaw2007-09-161-11/+172
| | | | | | it hasn't yet. SendSubscribeAck(), SendUnsubscribeAck(), and ApprovedDeleteMember() are all removed, though the latter is not yet completely eradicated.
* Work out subscription holding and handling. ApprovedAddMember() isBarry Warsaw2007-09-161-9/+245
| | | | | | gone. Fix up OwnerNotification class. Rewrite subauth.txt and subscribeack.txt for new implementation, especially removing the password notification from the latter. Add lots of tests.
* Support forwarding of held posts.Barry Warsaw2007-09-091-2/+22
|
* ListAdmin mostly gone, but not quite.Barry Warsaw2007-09-091-17/+350
| | | | | | | | | | | | | | | | Mailman/app/moderator.py: Most of the application level interface provided by ListAdmin is moved here now, including the ability to hold messages, subscriptions, and unsubscriptions, and to handle message (defer, discard, reject, accept). More work needed. Some untested conversion of API in Mailman/Cgi/admindb.py, confirm.py, bin/checkdbs.py. messagestore.py: Don't use or require the Date: header in the global message ID calculation. As described on the mailing list, we're only going to use the Message-ID header. IListRequests: added count_of() and of_type() methods.