| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Mailman/testing -> Mailman/test
* Removed Mailman/testing/base.py
* Fix mailmanctl by using a different way of calculating where the qrunner
script is. The configuration file no longer knows what BIN_DIR is, but the
mailmanctl script knows where it lives via sys.argv[0]. Also, PREFIX_DIR ->
VAR_DIR.
Also,
* Since the overwhelmingly predominant use of ILanguageManager is to get the
description, and since .get_language_data(code)[0] is not very readable,
split the interface into .get_description() and .get_charset().
* In the setup, automatically add all Mailman.bin modules as command line
scripts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing unit tests. Here's a summary of the changes.
- Removed all dependent third party packages, since the setup.py file now
claims all package dependencies such that they can be automatically
installed from the cheeseshop.
- Moved the misc directory into the Mailman package as Mailman/data. Moved
templates and messages to Mailman subpackages.
- Added an ILanguageManager interface, plus an implementation, so that
we don't use Defaults.LC_DESCRIPTIONS directly anymore. Added a doctest
for this interface and implementation. Defaults.LANGUAGES is moved into
mailman.cfg. Defaults.LANGUAGE_DICT is moved to _DEFAULT_LANGUAGE_DATA, and
LC_DESCRIPTIONS is removed. The calculation of the available and enabled
languages is moved to the Configuration class, but this will probably still
need work. Utils.GetLanguageDescr() and Utils.IsLanguage() are removed.
I'd like to remove GetCharSet() eventually too, but there are too many uses
of this currently, so I'm deferring it.
- Utils.findtext(): Hacks added so that templates can be retrieved from the
language catalog. The hack is that the template contents are used to find
the translation, but in the one test case where this is actually flexed, the
trailing newline in the file contents has to be trimmed. This is probably
not right.
- No more Defaults.py.in or mm_cfg.py! Defaults.py.in is moved to Defaults.py
and is no longer created from a template file. The script called
make_instance is added which creates an etc/mailman.cfg file from
mailman.cfg.in (previously, mailman.cfg.sample) and /that/ file now has the
small number of calculated values. In general, make_instance will not touch
mailman.cfg if it exists, unless the --force option is given. CGIEXT is
made the empty string by default (i.e. not generated). make_instance grows
a --var-dir option. Fleshed out the --languages opton.
- Defaults.py grows a DEFAULT_VAR_DIRECTORY variable, which is the default
location of the 'var' directory. The Configuration class uses this as one
of the directories it searches for its landmark, i.e. etc/mailman.cfg.
RUNTIME_DIR is gone, as is VAR_PREFIX.
- testall needs to write MAILMAN_USER, MAILMAN_UID, MAILMAN_GROUP,
MAILMAN_GID, and LANGUAGES run time variables.
- bin/withlist no longer needs to add config.BIN_DIR to sys.path, because in
fact that variable doesn't exist any more.
- Tweak the French catalog to make a test work. This is needed because of the
conversion from %-strings to $-strings.
- The setup.py now generates the .mo files before it does its thing. This
will have to be fixed, but for now we must generate these files on setup
build time instead of installation time.
- Removed an unused interface.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
column in the database for this list of strings. We use SQLAlchemy's
many-to-many relationship, however because of this, you cannot simply append
new unicodes to .available_languages. You need to wrap the language code in a
Language instance and append that instance to the list.
In order to handle this, I added a property MailList.language_codes which
returns a list of the code strings (not Language instances). Also new are
MailList.set_languages() for setting (i.e. overriding) the set of available
languages for the list; and add_language() which takes a single language code,
wraps it, and appends it. The code does not and should not use
.available_languages directory any more.
MailList.GetAvailableLanguages() is removed. The 'available_languages' column
is removed from the Listdata table.
Add a getValue() to Mailman.Gui.Language in order to unwrap the language codes
stored in the database's association table. Modify _setValue() to do the
wrapping.
In dbcontext.py, don't import * from the sqlalchemy package. It contains a
'logging' name which is not the standard Python logging package. I also added
essentially a bag of attributes class called Tables which will hold references
to all the SA tables that are created. Update the make_table() API to take an
instance of Tables.
Added a close() method to DBContext. This is needed for the updated unit test
suite.
Changed bin/import.py so that when available_languages is being set, it calls
MailList.set_languages() instead of trying to set that attribute directly.
Updated some language idioms while I was at it.
More eradication of mm_cfg in favor of the config object and the Defaults
module.
In testall.py, call initialize() instead of loginit.initialize().
Promote MAX_RESTARTS into a Defaults.py.in variable. This is because the unit
tests will knock that value down to something not so annoying should one of
the qrunner-required tests traceback.
Several other important changes to the unit test suite (which now completely
succeeds again!):
- Set the uid and gid of the temporary mailman.cfg and tmp*.db files to the
Mailman user and group as specified in the config object.
- Make sure that all of the tests point to a SQLite database file that was
created with the tempfile module. This way we don't pollute our main
database with data that is getting created during the unit tests.
- In the TestBase.setUp() method, be sure to close the existing dbcontext,
clear out the mappers, and then reconnect the dbcontext with the new
SQLALCHEMY_ENGINE_URL pointing to the tempfile. However, we don't need to
reload the MailList instance any more.
- Make all tests work, except for the tests that require crypt. That upgrade
path will not be available in this version of Mailman.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Configurable no-list error.
- Ultimate loop stop address in transport -> aliases.
- LMTP_ONLY_DOMAIN needs no individual transport entry.
- Use of alias/lmtp is exclusive.
WSGI brushups.
- _cookie_path() was made simple and retain common cookie for
admin/admindb/... etc.
- Removed absolute=1 from admindb/confirm/create/options.
configuration.py
- Use of add_runner() in etc/mailman.cfg needs change. config
is not loaded yet?
|
| |
|
|
|
|
|
|
| |
the new configuration object: admin, admindb, bounces, confirm, inject, join,
leave, owner, post, request, unshunt, version.
Also change MailList.GetScriptURL() to return the list's fully qualified name
in links.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
traces of our crufty old Syslog. Most of this work was purely mechanical,
except for:
1) Initializing the loggers. For this, there's a new module
Mailman/loginit.py (yes all modules from now on will use PEP 8
names). We can't call this 'logging.py' because that will
interfere with importing the stdlib module of the same name (can
you say Python 2.5 and absolute imports?).
If you want to write log messages both to the log file and to
stderr, pass True to loginit.initialize(). This will turn on
propagation of log messages to the parent 'mailman' logger, which
is set up to print to stderr. This is how bin/qrunner works when
not running as a subprocess of mailmanctl.
2) The driver script. I had to untwist the StampedLogger stuff and
implement differently printing exceptions and such to log/error
because standard logging objects don't have a write() method. So
we write to a cStringIO and then pass that to the logger.
3) SMTPDirect.py because of the configurability of the log messages.
This required changing SafeDict into a dict subclass (which is
better than using UserDicts anyway -- yay Python 2.3!). It's
probably still possible to flummox things up if you change the
name of the loggers in the SMTP_LOG_* variables in mm_cfg.py.
However, the worst you can do is cause output to go to stderr and
not go to a log file.
Note too that all entry points into the Mailman system must call
Mailman.loginit.initialize() or the log output will go to stderr
(which may occasionally be what you want). Currently all CGIs and
qrunners should be working properly.
I wish I could have tested all code paths that touch the logger, but
that's infeasible. I have tested this, but it's possible that there
were some mistakes in the translation.
- Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class
instance any more.
- True/False code cleanup, PEP 8 import restructuring, whitespace
normalization, and copyright year updates, as appropriate.
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| | |
|
| |
|
|
| |
address changes and confirmations of same.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
error message.
Closes SF bug # 703941 by Stuart Bishop, who also suggested the basic fix.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
point where the i18n and doc languages are set. Also, get the
languages using GetLanguageDescr() so that the language pull down list
is also in the correct language.
Fixes SF #658213 reported and patches by Daniel Buchmann.
subscription_cancel(): Set the language to the user's preferred so
that the cancel message is given in the right language.
subscription_confirm(): Set the i18n and doc languages to the language
from the form so it also shows up in the correct language.
|
| | |
|
| |
|
|
|
| |
addrchange_confirm(), reenable_confirm(): MMNoSuchUserError ->
NotAMemberError
|
| |
|
|
|
| |
have already been unsub'd, e.g. by the list administrator. Log an
error message and throw the cookie away.
|
| |
|
|
| |
language into the canonstr() call to properly display the fullname.
|
| |
|
|
|
|
| |
we have to convert strings to or from unicode. Given by Tokio
Kikuchi, modified slightly by Barry (if it's still broken, it's my
mistake).
|
| |
|
|
|
|
| |
showing the unsub'ing (or changing, or re-enabling) member's name, use
the version converted to the charset of the web page (or with &#XYZ;
conversion).
|
| |
|
|
|
| |
subscribe_policy is 2 or 3. Fixes bug #605933 reported by Ron
Jarrell.
|
| |
|
|
| |
information. Closes SF bug #599112 by Peer Heinlein.
|
| |
|
|
| |
#597407.
|
| |
|
|
|
| |
has already disposed of a message that the user is now trying to
confirm/cancel. Closes SF bug #594703 reported by Garey Mills.
|
| |
|
|
|
| |
non-digests unless the subscriber actually has a choice! Closes SF
bug # 563091 (not the u/i part).
|
| |
|
|
| |
response to SF bug #574240.
|
| |
|
|
|
| |
Also, use Utils.websafe() consistently throughout, instead of the
inconsistent calls to cgi.escape().
|
| |
|
|
|
| |
may occur if the address requesting a change has been removed before
the change was confirmed. This closes SF bug #445961.
|
| |
|
|
|
| |
Pending.SUBSCRIPTION key now uses UserDesc instances instead of
tuples.
|
| |
|
|
| |
stamp out passwords. Get rid of all vestiges.
|
| |
|
|
|
| |
from the subscription confirmation form. The potential for mischief
seems high.
|
| |
|
|
|
|
|
|
| |
re-enabling of a disabled membership). Specifically,
reenable_cancel(), reenable_confirm(), reenable_prompt(): New
functions to prompt for, cancel (i.e. defer) and confirm thru-the-web
re-enabling of a disabled membership.
|
| |
|
|
|
|
|
|
|
|
| |
Fixes to prevent cross-site scripting exploits. See
http://www.cert.org/advisories/CA-2000-02.html
Reported by zeno@cgisecurity.com
Fix is to cgi.escape() any strings regurgitated from the url back to
the browser in the html response.
|
| |
|
|
|
|
|
|
|
|
| |
results strings should be displayed in the language that the
subscribee has requested. Also, tailor the response message based on
whether the moderators have to approve a confirmed request or not.
Reported by Daniel Buchmann.
subscription_confirm(): Need a `listname' local variable for _()
string interpolation.
|
| |
|
|
| |
integer since that's what MemberAdaptor eventually wants.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
explicitly cancel the message via the web confirmation mechanism.
heldmsg_cancel(), heldmsg_confirm(), heldmsg_prompt(): New functions,
slightly misnamed (but retained for consistency).
I.e. "canceling" means "continue awaiting approval" and
"confirming" means "cancel the posting".
|
| |
|
|
|
|
|
|
|
|
|
|
| |
confirmations. :) Clicking on the emailed confirm url now brings up a
screen which requires the user to /then/ click on an explicit Confirm
button. They can also cancel their requested action.
So far, implemented subscription, unsubscription, and change of
address requests. Eventually this will include posting holds, etc.
Subscription confirmation screen allows them to override some values
they entered in the original request (but not, of course, the email
address!).
|
| |
|
|
|
|
|
| |
called, be sure to catch MMNeedApproval, which can be raised if
subscriptions are confirm+approve.
(Yeah, I know this is eventually going to get rewritten...)
|
| |
|
|
|
|
| |
were sent and the user confirmed (by web click) them both. The first
will delete the member but the second will raise this exception, so do
something more sensible than letting it trickle to the top.
|
| |
|
|
| |
as translatable.
|
| |
|
|
|
|
| |
argument to Format() anymore.
success(): Handle the the new CHANGE_OF_ADDRESS confirmable action.
|
| |
|
|
| |
data `automatically' instead of in this function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main(): Set up a signal handler to catch SIGTERM, and unlock the
mailing list when this happens. This has the side effect of aborting
any changes to the MailList object that this web hit may have made.
This is necessary due to semantics of Apache's mod_cgi: when the
browser closes the socket, eventually Apache receives a SIGPIPE (on
output to the closed socket). This causes Apache to SIGTERM the cgi
process, wait three seconds, then SIGKILL it. We want to be able to
clean up the locks, so the best we can do is try to unlock the list on
the SIGTERM. Once we get SIGKILLed, there's nothing we can do.
This change also moves the Save() call into the try: block so that the
finally: block /only/ unlocks the list. Thus, the list gets unlocked
in most situations. There are still race conditions where 1) the
config.db file could be corrupted; 2) list locks could still be
unreleased. Given the semantics of signals in Python, the interaction
of Apache's mod_cgi, and other factors, this is the best we can do,
and it should be better than the old situation.
XXX What do other web servers or cgi execution environments do?
|
| |
|