| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Add a pipeline queue runner.
|
| |
|
|
| |
Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
rule. Add doctest as appropriate.
|
| | |
| |
| |
| |
| |
| | |
rule. Add doctest as appropriate.
DEFAULT_MAIL_COMMANDS_MAX_LINES -> EMAIL_COMMANDS_MAX_LINES
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
is concerned. This still requires a minor patch to Storm to handle timedelta
types in SQLite.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Remove flush() altogether. Yee-haw! Rework queries to be Stormy. Fix
doctests to be Unicode-ish.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
Convert IMailingList.personalize to a enum.
Change all non-obsolete occurances of GetListEmail() to posting_address.
|
| |
|
|
| |
only constant left in Mailman.constants is now actually a constant.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
it hasn't yet. SendSubscribeAck(), SendUnsubscribeAck(), and
ApprovedDeleteMember() are all removed, though the latter is not yet
completely eradicated.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|