| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
reasons for this, but most importantly, the changes from SQLAlchemy/Elixir 0.3
to 0.4 were substantial and caused a lot of work. This work unfortunately did
not result in a working branch due to very strange and inconsistent behavior
with Unicode columns. Sometimes such columns would return Unicode, sometimes
8-bit strings, with no rhyme or reason. I gave up debugging this after many
hours of head scratching.
Oh yeah, no more flush!
Storm enforces Unicode columns, which is very nice, though requires us to add
lots of 'u's in places we didn't have them before. Ultimately, this is a good
thing so that the core of Mailman will be Unicode consistent.
One thing I still want to clean up after this, is the function-scoped imports
in the model code. Part of the reason for the separate model classes was to
avoid this, but for now, we'll live with it. Storm's architecture requires us
to maintain a database-table-class registry for simple clearing after tests
in Database._reset(). This is made fairly simple by Storm allowing us to use
our own metaclass for model classes.
Storm does require that we write our own SQL files, which is a downside, but I
think our schema will be easy enough that this won't be a huge burden. Plus
we have a head-start <wink>.
Another cool thing about Storm is the explicit use of stores for objects.
This should eventually allow me to flesh out my idea of storage pillars for 1)
lists, 2) users, 3) messages.
Some other changes:
- pylint and pyflakes cleanups
- SQLALCHEMY_ENGINE_URL -> DEFAULT_DATABASE_URL
- Don't import-* from Version in Defaults.py
- Add interface method to Mailman.Message.Message so that __getitem__() and
get_all() always return Unicode headers, even when the underlying objects
are strings. This should generally be safe as headers are required by RFC
to be within the ASCII range.
- Fix bin/arch.py to use proper initialization.
|
| | | |
|
| | |
| |
| |
| |
| | |
is concerned. This still requires a minor patch to Storm to handle timedelta
types in SQLite.
|
| |/
|
|
|
|
|
|
| |
Fixed an issue where an implicit text/plain part without any headers gets
lost.
Moved the cleansing of the filename extension to a place where it is
guaranteed to be a string as opposed to an empty list.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
is moved to Mailman.lockfile.
Remove a few more MailList methods that aren't used any more, e.g. the lock
related stuff, the Save() and CheckValues() methods, as well as
ChangeMemberName().
Add a missing import to lifecycle.py.
We no longer need withlist to unlock the mailing list. Also, expose
config.db.flush() in the namespace of withlist directly, under 'flush'.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
into the IMailingList interface. OTOH, MemberAdaptor.py is completely useless
now (though not entirely eradicated), as is OldStyleMemberships.py.
versions.py isn't necessary any longer either because we'll have to do
database migrations (and conversions from MM2.1) completely differently.
New command line script 'set_members' which is used to take a CSV file and
syncing that to a list's membership.
Added back the DeliveryStatus.unknown item because we'll need it when we
migrate MM 2.1 databases.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
used where we used to do a try/except to temporarily change the global
translation language. This makes the code shorter and cleaner. E.g.
with i18n.using_language(another_language):
# do something
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
message_store, and pendings 'databases' hang off the IDatabase object attached
to the config object. For IPending, no adaptation is necessary.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pending.py module is removed. Added an interface to this functionality such
that any IPendable (essentially a key/value mapping) can be associated with a
token, and that token can be confirmed and has a lifetime. Any keys and
values can be stored, as long as both are unicodes.
Added a doctest.
Modified initialization of the database layer to support pluggability via
setuptools. No longer is this layer initialized from a module, but now it's
instantiated from a class that implements IDatabase. The StockDatabase class
implements the SQLAchemy/Elixir layer, but this can be overridden in a
setup.py. Bye bye MANAGERS_INIT_FUNCTION, we hardly knew ye.
Added a package Mailman.app which will contain certain application specific
functionality. Right now, the only there there is an IRegistar
implementation, which didn't seem to fit anywhere else.
Speaking of which, the IRegistrar interface implements all the logic related
to registration and verification of email addresses. Think the equivalent of
MailList.AddMember() except generalized out of a mailing list context. This
latter will eventually go away. The IRegistrar sends the confirmation email.
Added an IDomain interface, though the only implementation of this so far
lives in the registration.txt doctest. This defines the context necessary for
domain-level things, like address confirmation.
A bunch of other cleanups in modules that are necessary due to the refactoring
of Pending, but don't affect anything that's actually tested yet, so I won't
vouch for them (except that they don't throw errors on import!).
Clean up Defaults.py; also turn the functions seconds(), minutes(), hours()
and days() into their datetime.timedelta equivalents.
Consolidated the bogus email address exceptions.
In some places where appropriate, use email 4.0 module names instead of the
older brand.
Switch from Mailman.Utils.unique_message_id() to email.utils.make_msgid()
everywhere. This is because we need to allow sending not in the context of a
mailing list (i.e. domain-wide address confirmation message). So we can't use
a Message-ID generator that requires a mailing list. OTOH, this breaks
Message-ID collision detection in the mail->news gateway. I'll fix that
eventually.
Remove the 'verified' row on the Address table. Now verification is checked
by Address.verified_on not being None.
|
| |
|
|
| |
artifacts are removed, as is the C files which we will no longer need.
|
| |
|
|
|
|
|
|
| |
don't modernize the Scrubber handler.
The is the last of the handler test conversions until we figure out what to do
with the Approve handler. In a unified user database the semantics of this
are unclear.
|
| |
|
|
| |
cleanup (really, not much was necessary).
|
| |
|
|
|
|
|
|
|
| |
module update to make the thing pass. Much more coverage is still necessary,
but this at least recreates the existing tests.
Changes to the test infrastructure to make REPORT_ONLY_FIRST_FAILURE
conditional on lower (default) verbosity. Increase the verbosity via
'bin/testall -v' and you get all the failure output.
|
| |
|
|
| |
a more modern Python style.
|
| |
|
|
| |
modernization of Hold.py was performed.
|
| |
|
|
|
|
|
|
| |
Python idioms. The recipients are now returned as a set instead of a list, so
duplicates are quashed.
In MailList.InitTempVars() we need to create the list's data directory when
the list is initialized. If the directory already exists, this does nothing.
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
a null byte or other garbage in the extension. Cleaned this.
- Improved handling of None payloads.
- Cleaned up a few charset coercions.
OutgoingRunner.py - Made probe bounce processing and queuing of bounces
conditional on having some permanent failure(s).
|
| | |
| |
| |
| |
| |
| |
| | |
actually there /was/ no separate AvoidDuplicates test, but now there
is, even though it may not be full coverage.
Update the AvoidDuplicates handler to use more modern Python idioms.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
into several sub-documents.
Defaults.py.in: Removed OLD_STYLE_PREFIXING. So-called 'new style' prefixing
is the default and only option now.
CookHeaders.py is updated to the new API and some (but not all) of the code
has been updated to more modern Python idioms.
reply_goes_to_list attribute has been changed from a strict integer to a
munepy enum called ReplyToMunging.
RFC 2369 headers List-Subscribe and List-Unsubscribe now use the preferred
-join and -leave addresses instead of the -request address with a subject
value.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
some XXX's in the doc test because digest recipients aren't tested
(though those may go in a different doctest), and neither are urgent
messages. This latter is for the same reason that the Approved
handler is not yet tested; which password do you use in that header?
The CalcRecips tests would also seem the natural place to test the
receive_list_copy preference, but that actually gets processed in the
AvoidDuplicates handler, so it isn't tested here.
Add delivery_status (of type enum DeliveryStatus) to preferences. I'm
not entirely sure that's the right place for it, but it lets me finish
converting the test for now.
Expose the rest of the preferences through the IMember interface.
|
| | |
| |
| |
| |
| | |
MailingList.last_post_time column to a DateTime (i.e. Python datetime
object).
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or necessary in the current data model.
Convert the test_handlers.py Python test to an acknowledge.txt doctest, and
make the Acknowledge.py handler work with the new data model. There are a few
XXX comments left in here due to the fact that the web stuff is a total hack
in the current branch currently.
Added IMailingListWeb methods and properties to the MailingList model class:
web_host and script_url().
Work out how IMembers will expose the lookup-order based preferences. By
getting the attribute IMember.preferences you can see exactly the preferences
overridden by this member. To use the lookup order, use
IMember.delivery_mode, IMember.acknowledge_posts, etc. IOW, the IMember
interface now provides the properties directly and access through this
mechanism supports lookup order with definitive preference values.
Also added IMember.unsubscribe() which does the obvious, and
IMember.options_url() which is a total hack for providing a url (but not the
ultimately right one) for the user's option page.
Refactor the model's roster classes. Also added IRoster.get_member() method
with efficient queries to return the right results. Make
AdministratorRoster.members more efficient due to a better query.
Update the membership.txt doctest to eliminate a chance ordering effect, and
also to test finding members with .get_member(). The clean up section uses
the new .unsubscribe() method.
|
| |
|
| |
before looking for/deleting the Approve(d): line.
|
| |
|
|
|
|
|
|
|
| |
do anything. The doctest needs to have some way of testing the grace period,
but it's still more tests of the module than there every was before.
Update the Replyboty handler to use $-strings internally. Eliminate the use
of %-strings in auto-response textsy. Only $-strings can be used, which
allows us to get rid of another use of SafeDict.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes live in Mailman/databae/model now.
Remove the TestDecorate test class from test_handlers.py and move them into a
doctest called decorate.txt (with harness in test_decorate.py).
Remove the dependence on SafeDict from the Decorate handler because I can now
use string.Template object to safely fill in header and footer templates.
Eventually I want to completely remove SafeDict from Mailman, but it's still
used in a few other places.
This also means that only $-strings will be supported in headers and footers,
and the import script will have to convert %-strings to $-strings. Also,
'_internal_name' is no longer a supported header/footer substitution
variable. Use $real_name or $list_name now. Added $fqdn_listname as a
substitution variable. Update the DEFAULT_MSG_FOOTER accordingly.
|