| 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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This would cause duplicate members (e.g. owners) if you created, deleted and
then recreated the mailing list.
Mailman.app.create -> Mailman.app.lifecycle; Mailman/doc/create.txt ->
Mailman/doc/lifecycle.txt; also added a remove_list() function.
Added SubscriptionError base class, made HostileSubscriptionError inherit from
that, and added a new AlreadySubscribedError.
Rewrote bin/rmlist to use the new lifecycle.remove_list() function.
IAddress.subscribe() must now throw an AlreadySubscribedError if the address
is already subscribed to the mailing list with the given role.
Added a Subscribers roster, attached to the IMailingList which gives access to
all subscribers of a mailing list, regardless of their role. Added a new test
for this roster.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BadListNameError is gone. Use InvalidEmailAddress instead.
Move owner registration from bin/newlist to Mailman/app/create.py, but do not
verified owner email addresses here. Eventually we'll hook in the IRegistrar
stuff for unverified owner addresses.
IStyleManager.register() verifies that its registering an IStyle.
Added IStyleManager.unregister(), along with updated interfaces and doctests.
Clean up all styles except the default one in the system documentation test
harness.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interface to create and delete lists. Mostly that's working now, but I need
unit tests for most of the new work contained in this revision.
Implemented a rudimentary 'list styles' subsystem, along with interfaces, but
no tests yet. Moved all of MailList.InitVars() into a DefaultStyle, which is
always available at priority zero. It's used by default if there are no
matching styles for a mailing list.
Because of the list styles, we can now get rid of (almost) all InitVars()
methods. And because of /that/ we can get rid of the mixin clases whose sole
purpose was to provide an InitVars() method. Yay for code removal!
Mixin modules/classes removed: Autoresponder, GatewayManager, TopicManager.
Removed the Mailman/ext crufty extension mechanism. Extensions will now be
done using setuptools plugins. Hopefully this will take us everywhere we need
to go, but I'll add Mailman.ext back if necessary later.
Mailiman.app.create module added to implement a common, higher-level list
creation feature. This is used by bin/newlist now, though some of that
functionality (namely, ensuring the owners exist in the database, and
notifying the owners) should be moved here. The MTA plugins aren't yet
integrated into this, but need to be.
Mailman.app.plugins module added to generalize setuptools plugin management.
Defaults.DEFAULT_REPLY_GOES_TO_LIST now gets initialized with a proper enum.
Also, the duplicate DeliveryMode and DeliveryStatus enums are removed from
Defaults because they're in Mailman.constants.
Added Errors.DuplicateStyleError.
Updated Utils.list_exists() to use the new IListManager.get() interface, which
has been changed to return None if the list doesn't exist (for consistency)
instead of raising an exception. Utils.list_names() also needed to be fixed
to use config.db.list_manager.
bin/make_instance, bin/newlist, bin/rmlist changed to use parser.error()
istead of printing to sys.stderr and sys.exit(1).
bin/newlist and bin/rmlist now works with the IListManager interface, so you
can create and delete lists from the command line again. The CLI for newlist
has been much simplified; it no longer prompts for missing positional
arguments. It now uses a more traditional CLI. newlist also accepts zero to
many owners, and it ensures that the owners are all in the database. It no
longer asks for a list password, because this doesn't make sense any more.
bin/withlist has also been fixed to work with the IListManager interface.
There are lots of XXXs and FIXMEs that need to be resolved before this can
land. Also, we need to test all this stuff before it can land.
Configuration.load() is now taught to search in sys.argv[0] for
var/etc/mailman.cfg since this is where it is for egg development layouts.
Also, VAR_DIR must be abspath'd.
Added an __all__ to Mailman.constants, and added an Action enum.
The listmanager implementation has to set the mlist.created_at time. There's
also a bit of crufty refactoring going on to instantiate the roster objects
whenever the list is created or retrieved from the database.
Several MailingList column types are now set to our custom TimeDeltaType,
which knows how to store a datetime.timedelta. A SQLAlchemny converter type
is added to Mailman.database.types. I also fixed a bug in the EnumType
implementation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
of course now succeed.
Rename Bouncer.py's BounceMessage() method to bounce_message() and remove the
'msgdata' parameter, which wasn't being used. Change the RejectNotice
exception class to expose .notice directly, as there's no reason for this to
be an accessor or property.
Move the coverage.py installation to the install-packages target instead of
the install-other target, so that it only gets installed once the pythonlib
directory is created.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
confident the Elixir branch is ready to become mainline. Also, fewer branches
makes for an easier migration to a dvcs.
Don't expect much of the old test suite to work, or even for much of the old
functionality to work. The changes here are disruptive enough to break higher
level parts of Mailman. But that's okay because I am slowly building up a new
and improved test suite, which will lead to a functional system again.
For now, only the doctests in Mailman/docs (and their related test harnesses)
will pass, but they all do pass. Note that Mailman/docs serve as system
documentation first and unit tests second. You should be able to read the
doctest files to understand the underlying data model.
Other changes included in this merge:
- Added the Mailman.ext extension package.
- zope.interfaces uses to describe major components
- SQLAlchemy/Elixir used as the database model
- Top level doinstall target renamed to justinstall
- 3rd-party packages are now installed in pythonlib/lib/python to be more
compliant with distutils standards. This allows us to use just --home
instead of all the --install-* options.
- No longer need to include the email package or pysqlite, as Python 2.5 is
required (and comes with both packages).
- munepy package is included, for Python enums
- IRosterSets are added as a way to manage a collection of IRosters. Roster
sets are named so that we can maintain the indirection between mailing lists
and rosters, where the two are maintained in different storages.
- IMailingListRosters: remove_*_roster() -> delete_*_roster()
- Remove IMember interface.
- Utils.list_names() -> config.list_manager.names
- fqdn_listname() takes an optional hostname argument.
- Added a bunch of new exceptions used throughout the new interfaces.
- Make LockFile a context manager for use with the 'with' statement.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
scheme. Fix mmsitepass and test cases accordingly. Details:
- set_global_password(): Instead of taking a string for 'scheme' argument,
take None and then coerce that into passwords.Schemes.ssha
- Add a base PasswordError and a BadPasswordSchemeError error that derives
from that. For consistency, multiply inherit MMBadPasswordError and
MMPasswordsMustMatch from PasswordError.
- Add a passwords.lookup_scheme() method which turns scheme_names into scheme
enum constants. It returns None if the lookup fails.
- passwords.py: change the internal representation of _SCHEMES_BY_TAG
dictionary to map scheme names to scheme enum values. Change internal uses
of this dictionary to then turn those enum values into hash classes, or
whatever else we need.
- make_secret(): Raise BadPasswordSchemeErrorif the given schema (which should
be an enum value) is invalid.
- TestBase.tearDown(): Clear out any <site> locks that might hang around after
a test case runs.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://mailman.svn.sourceforge.net/svnroot/mailman/branches/tmp-sqlalchemy-branch
................
r8114 | bwarsaw | 2006-12-06 00:16:54 -0500 (Wed, 06 Dec 2006) | 44 lines
Initial take on using SQLAlchemy to store list data in lieu of Python pickles.
While all the list data (including OldStyleMemberships attributes) are stored
in the database, many attributes are stored as PickleTypes binary data. This
isn't idea but it gets things working until a more sophisticated schema can be
developed.
MailList class is now a new-style class, as is required by SQLAlchemy. This
makes several things, er, interesting. Rip out all the low-level pickle
reading and writing stuff. Hook SA transaction events into Lock() and
Unlock(). Move the hooking of the _memberadaptor into InitTempVars(), which
gets called by the SQLAlchemy hooks (MailList.__init__() never is).
Add an initialize.py module which centralizes all the initialization bits that
command line scripts have to do, including configuration, logging, and atabase
initialization.
This change also converts bin/withlist to mmshell wrapper.
Update to SQLAlchemy 0.3.1.
Revamp paths.py.in considerably. There were several problems with the old
way. We no longer disable default loading of site-packages so we don't need
to add Python's site-packages back to sys.path. Also, because
site.addsitedir() causes things like .pth paths to be /appended/ to sys.path,
they actually won't override any site-installed packages. E.g. if SQLAlchemy
is installed in the system Python, our version will not override. IIUC,
setuptools-based packages can be configured to work properly in the face of
package versions, however not all packages we currently depend on are
setuptools-based. So instead, we steal a bit of stuff from site.py but change
things so the prepend .pth stuff to sys.path.
Update several modules to use True/False and whitespace normalization.
Convert from mm_cfg to config object. Modernize a few coding constructs.
Add a couple of exceptions to handle database problems.
In the export script, include the widget type in the elements. This helped in
my stupid little throw away conversion script, but I think it will be more
generally useful.
Add an interact.py module which refactors interactive interpreter access.
Mostly this is used by withlist -i, but it lets us import Mailman.interact and
drop into a prompt just about anywhere (e.g. debugging).
................
r8115 | bwarsaw | 2006-12-07 09:13:56 -0500 (Thu, 07 Dec 2006) | 22 lines
Start to flesh out more of the SQLAlchemy mechanisms.
Added a MailList.__new__() which hooks instantiation to use a query on
dbcontext to get an existing mailing list. A 'no-args' call means we're doing
a Create(), though eventually that will change too.
For now, disable the CheckVersion() call. Eventually this will be folded into
schema migration.
list_exists(): Rewrite to use the dbcontext query to determine if the named
mailing list exists or not. Requires the fqdn_listname.
Eradicate two failed member adaptors: BDBMemberAdaptor and SAMemberships.
Change the way the DBContext holds onto tables. It now keeps a dictionary
mapping the table's name to the SA Table instance. This makes it easier to
look up and use the individual tables.
Add 'web_page_url' as an attribute managed by SA, and remove a debugging
print.
................
r8116 | bwarsaw | 2006-12-11 07:27:47 -0500 (Mon, 11 Dec 2006) | 29 lines
Rework the whole dbcontext and transaction framework. SA already handles
nested transactions so we don't have to worry about them. However, we do have
the weird situation where some transactions are tied to MailList
.Lock()/.Unlock()/.Save() and some are tied to non-mlist actions. So now we
use an @txn decorator to put methods in a session transaction, but then we
also hook into the above MailList methods as possibly sub-transactions. We
use a weakref subclass to manage the MailList interface, with a dictionary
mapping MailList fqdn_listnames against transactions. The weakrefs come in by
giving us a callback when a MailList gets derefed such that we're guaranteed
to rollback any outstanding transaction.
Also, we have one global DBContext instance but rather than force the rest of
Mailman to deal with context objects, instead we expose API methods on that
object into the Mailman.database module, which the rest of the code will use.
Such methods must be prepended with 'api_' to get exposed this way.
bin/rmlist now works with the SA-backend. I refactored the code here so that
other code (namely, the test suite) can more easily and consistently remove a
mailing list. This isn't the best place for it ultimately, but it's good
enough for now.
New convenience functions Utils.split_listname(), .fqdn_listname().
Convert testall to use Mailman.initialize.initialize(). Not all tests work,
but I'm down to only 8 failures and 7 errors. Also, do a better job of
recovering from failures in setUp().
MailList.__new__() now takes keyword arguments.
................
r8117 | bwarsaw | 2006-12-11 22:58:06 -0500 (Mon, 11 Dec 2006) | 7 lines
Unit test repairs; even though the unit tests are still pretty fragile,
everything now passes with the SQLAlchemy storage of list data.
Added missing 'personalize' column. Converted mailmanctl and qrunner to
initialize() interface. Fixed _cookie_path() to not fail if SCRIPT_NAME is
not in the environment.
................
r8118 | bwarsaw | 2006-12-27 18:45:41 -0500 (Wed, 27 Dec 2006) | 21 lines
Utils.list_names(): Use a database query to get all the list names.
dbcontext.py: Added api_get_list_names() to support Utils.list_names().
listdata.py: Added two additional MailList attributes which need to be stored
in the database. The first is 'admin_member_chunksize' which isn't modifiable
from the web. The second is 'password' which holds the list's password.
HTMLFormatObject: item strings can now be unicodes.
bin/list_lists.py: Must call initialize() to get the database properly
initialized, not just config.load(). This will be a common theme.
SecurityManager.py:
- Remove md5 and crypt support
- Added mailman.debug logger, though it will be only used during
debugging.
- The 'secret' can be a unicode now.
- A few coding style updates; repr() instead of backticks, 'key in dict'
instead of 'dict.has_key(key)'
................
r8119 | bwarsaw | 2006-12-27 19:13:09 -0500 (Wed, 27 Dec 2006) | 2 lines
genaliases.py: config.load() -> initialize()
................
r8120 | bwarsaw | 2006-12-27 19:17:26 -0500 (Wed, 27 Dec 2006) | 9 lines
Blocked revisions 8113 via svnmerge
........
r8113 | bwarsaw | 2006-12-05 23:54:30 -0500 (Tue, 05 Dec 2006) | 3 lines
Initialized merge tracking via "svnmerge" with revisions "1-8112" from
https://mailman.svn.sourceforge.net/svnroot/mailman/branches/tmp-sqlalchemy-branch
........
................
r8121 | bwarsaw | 2006-12-28 23:34:52 -0500 (Thu, 28 Dec 2006) | 20 lines
Remove SIGTERM handling from all the CGI scripts. This messes with HTTPRunner
because when you issue "mailmanctl stop" after the signal handler has been
installed, the process will get a SIGTERM, the signal handler will run, and
the process will exit with a normal zero code. This will cause mailmanctl to
try to restart the HTTPRunner.
I don't think we need that stuff at all when running under wsgi with a
SQLAlchemy backend. If mailmanctl kills the HTTPRunner in the middle of the
process, I believe (but have not tested) that the transaction should get
properly rolled back at process exit. We need to make sure about this, and
also we need to test the signal handling functionality under traditional CGI
environment (if we even still want to support that).
Also, make sure that we don't try to initialize the loggers twice in qrunner.
This was the cause of all the double entries in logs/qrunner.
Fix a coding style nit in mailmanctl.py.
De-DOS-ify line endings in loginit.py.
................
|
| |
|
|
|
|
|
|
| |
the web u/i to work. This also fixes the use of Utils.list_names() in the
list and admin overviews. This API now returns a set, but the CGIs want to
sort them, so we need to turn them back into lists.
This change also elaborates an exception so that the list name is reported.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name in more than one domain.
- Totally eradicate MAILMAN_SITE_LIST, and in fact the entire need for a site
list. The functions that the site list previously performed are either
removed or supported in other ways. For example, instead of forwarding
owner bounces to the site list, we now have a SITE_OWNER_ADDRESS which
should point to a human, and such bounces are sent there instead. There's
also a "no reply" email address that should be set up to go to devnull. For
any message that never expects a reply, the sender is set to this address.
- Remove the Site.py module. It was an experimental approach to trying to
support virtual domains, and we're going to do it so much better now that
this module is no longer necessary. Site._makedirs() -> Utils.makedir().
- VIRTUAL_HOST_OVERVIEW is completely removed, since now virtual hosts are
always enabled. Virtual domains should be added to mailman.cfg by using the
new add_domain() function. add_virtualhost() is gone. If no virtual
domains are added explicitly, we add the default one that configure guessed
(but we never add that if domains are added explicitly).
- Utils.get_domain() -> Utils.get_request_domain()
- withlist code cleanup and make sure that we load etc/mailman.cfg
- A new base exception called MailmanException is added, from which all
exceptions defined in Errors.py ultimately derive. MailmanError is retained
and derives from MailmanException.
- BadDomainSpecificationError is added.
- Remove the -V/--virtual-host-overview option from list_lists and add instead
-d/--domain and -f/--full.
- bin/update probably works but needs more testing.
- bin/newlist and bin/rmlist take fqdn list names, but default to the default
domain if @whatever isn't given. newlist's -u/--urlhost and -e/--emailhost
options are removed. The domain that the list is being added to must
already exist.
- Minor code cleanup in Message.py
- Bump version to 2.2.0a1
- The Configuration object grows a .domain dictionary which maps email hosts
to url hosts. The reverse mapping is supported, but not directly; use
Configuration.get_email_host() instead.
- Mailman/Cgi/create is converted from mm_cfg to config, and some minor code
cleanup is performed. Also, convert to __i18n_templates__ = True.
- New MailList APIs:
+ property .fqdn_listname
+ GetNoReplyEmail()
+ Create() API changes and refactoring.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Remove True/False binding cruft
- Remove __future__ statements for nested scopes
- Remove ascii_letters import hack from Utils.py
- Remove mimetypes.guess_all_extensions import hack from Scrubber.py
- In Pending.py, set _missing to object() (better than using [])
Also, update copyright years where appropriate, and re-order imports more to
my PEP 8 tastes. Whitespace normalize.
|
| | |
|
| | |
|
| |
|
|
| |
attempting to confirm to a different list.
|
| |
|
|
| |
need three ways to raise "not a member" exceptions.
|
| | |
|
| |
|
|
| |
subscription address feature.
|
| |
|
|
|
|
| |
translatable strings here just need to be marked as such, using the
identity _() function. They'll always get translated before they're
used.
|
| |
|
|
| |
message. Add a notice() method to return the rejection notice.
|
| |
|
|
|
|
|
|
|
| |
many problem due to docstring non-extraction in pygettext). Now
the attribute `reason' is used as the reason instead of the
docstring, and reason_notice() is the called interface. This
mirrors exactly how rejection notices are done.
HoldMessage.__str__(): Removed.
|
| |
|
|
|
|
|
|
|
|
|
| |
MMAlreadyAMember: Make these class based exceptions.
MemberError, NotAMemberError, AlreadyReceivingDigests,
AlreadyReceivingRegularDeliveries, CantDigestError, MustDigestError:
Add these "new wave" exceptions, which are raised by the
MemberAdaptors.
NB: I really need to go through and make all the exceptions sane!
|
| |
|
|
|
| |
RejectMessage: New base exception class, used to signal messages that
should be bounced back to the original sender.
|
| |
|
|
|
| |
the temporaries and the permanents. Store these in instance
variables.
|
| |
|
|
| |
LoopError: all error classes are now moved here.
|
| |
|
|
| |
templates/headfoot.html. Closes SF bug #114167, Jitterbug PR #209.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
MMListError: new base class for all list-opening related exceptions.
MMUnknownListError: Change to class-based exception inheriting from
MMListError.
MMBadListError: Becomes class MMCorruptListDatabaseError
MMListNotReady: Becomes class MMListNotReadyError
MMBadConfigError: removed.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
class for all Mailman exception. When creating a new exception class,
or converting an old string-based exception, always use this as the
base class.
MMLoopingPost, EmailAddressError: Use MailmanError as base class.
LostHeldMessage: New exception which handles the case when the held
message text file gets lost (i.e. deleted from the file system) during
an admindb transaction.
|
| |
|
|
| |
MMLoopingPost: make this a class
|
| |
|
|
| |
MMBadPasswordError and MMPasswordsMustMatch have been moved.
|
| | |
|
| |
|
|
|
|
|
| |
Because I want to be able to catch both MMBadEmailError and
MMHostileAddress in a `politically correct' and clean except clause, I
made both exceptions classes which derive from new exception class
EmailAddressError.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was in (which was largely my fault from before).
Before:
1) web_subscribe_requires_confirmation was showing in the
admin cgi, but not working.
2) all subscribes that required admin approval were going
through the confirmation process.
3) the code implementing the confirmation process was
distributed between the subscribe cgi and
MailCommandHandler, duplicated in places and disrupting
the previous interface to list.AddMember.
4) the open_subscribe variable was confusing because
it didn't pay any attention to confirmations.
Now, things are organized a little differently, but in a much cleaner
way. there is one variable that deals with subscription policy, called
"subscribe_policy". It's setting determines what happens with both
the web based and the mail based subscriptions. there are 4 options:
0 - open subscribe policy
1 - confirmation required
2 - admin approval required
3 - confirmation and then admin approval required
there is a site configuration variable in Defaults.py called
ALLOW_OPEN_SUBSCRIBE, which determines whether or not an open
subscribe policy is an option. If it's not, the admin cgi interface
does not present it as an option.
I have restored a slightly modified version of the
prior-to-confirmations interface for list.AddMember, where all you
have to code is:
try:
list.AddMember(email, digest, password)
except Errors.MMBadEmail:
except Errors.MMAlreadySubscribed:
[ ... all those other good things it used to check ...]
except Errors.MMSubscribeNeedsConfirmation:
# the confirmation has already been sent.
# so just report accordingly to whatever the ap is.
In addition, I have moved the code for processing a confirmation
request to MailList.py so that it can be used in both a confirmation
cgi (which does not yet exist, but will) and the mailcmd script.
it's interface is:
try:
list.ProcessConfirmation(cookie)
except Errors.MMBadConfirmation:
# the cookie doesn't correspond to anything
except Errors.MMNeedApproval:
# the list is set to approve+confirm subscribe_policy.
A listing of the changes to the files follows:
Mailman/Defaults.in: added ALLOW_OPEN_SUBSCRIBE,DEFAULT_SUBSCRIBE_POLICY
deleted DEFAULT_OPEN_SUBSCRIBE, changed
DATA_FILE_VERSION to 5
Mailman/Errors.py: added MMBadConfirmation and
MMSubscribeNeedsConfirmation
Mailman/MailCommandHandler.py: moved the confirmation code to
MailList.py and use the new (old)
list.AddMember interface
MailMan/MailList.py: added .ProcessConfirmation(cookie), changed
AddMember to fit new (old) interface.
deleted config info for open_subscribe
and replaced with config info for
subscribe_policy that acts according to
mm_cfg.ALLOW_OPEN_SUBSCRIBE. Also made
list.ApprovedAddMember's "noack"
argument just "ack" for simplicities
sake and made it default to None
instead of 0 so that if the ack
variable isn't passed, it sets it to
the value of the lists
.send_welcome_msg setting.
Mailman/versions.py: added handling for new data file format,
replacing open_subscribe with a reasonable value
for subscribe_policy based on a combination of
what open_subscribe is and what
mm_cfg.ALLOW_OPEN_SUBSCRIBE is set to.
Mailman/Cgi/admin.py: made the cgi handle the output and processing of
subscribe_policy based on the setting of
mm_cfg.ALLOW_OPEN_SUBSCRIBE.
removed erroneous processing of whether or not
to send an ack with mass subscription based on
new interface to list.ApprovedAddMember (this
processing is to be replaced with a good idea
from john -- making mass subscribe have it's own
option of whether or not to send welcome
messages).
Mailman/Cgi/subscribe.py: made backgrounds white, and made it use the
MailList.AddMember interface described
above.
Mailman/Makefile.in: looks like this part of that distclean patch from
NAGY didn't make it in yet (rm'ing mm_cfg.py as well
as Defaults.py)
scott
|
| |
|
|
|
|
|
| |
Note: MESSAGE_DECORATION_NOTE should be pulled out into a
templates/*.txt file.
Note: Exceptions should be converted to class based.
|
| | |
|
| |
|
|
|
|
|
| |
do so.
Added a copy of the GNU GPL.
Added information about mailman-users in README, and reworded some text in there (made the credits less verbose... perhaps they should move to a credits file?)
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
messages to below the errors.
Preparing to package a distribution - add a module docstring and
__version__ info.
|
| |
|
|
|
| |
they can be recognized in post script, eg to avoid sending hold
messages to spammers.
|
| |
|
|
|
| |
introduced via the standard interface, or changed by finagling of one
sort or the other.
|
| |
|
|
|
| |
particular, so 'post' script can recognize when messages are being
held for approval due to moderation.
|
| | |
|
| |
|
|
| |
express how list loads fail.
|
| |
|