summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* add_error_message(): Converted to Document.addError().bwarsaw2002-02-231-26/+12
|
* Bump copyright years.bwarsaw2002-02-231-1/+1
|
* handle_form(): We break the handling of the header and footerbwarsaw2002-02-232-0/+65
| | | | | | | | | | | | | | | | attributes into a special method which does some sanity checking on the interpolation strings. First, it checks to see if we're using the new experimental $-strings, and then depending on the style of interpolation being used, it extracts the identifiers (variables) in the string and compares them against a known valid list. Any invalid variables are flagged and the changes are discarded. If the user simply left off a trailing `s' (as in %(foo)s), then this can be corrected, but a warning is still printed. Note: In NonDigest.py we're using a module level function which is imported by Digest.py's HandleForm(). Makes it convenient to share code, but this should really be refactored along with Autoresponse.py's HandleForm().
* GetConfigInfo(): Update the description of the interpolation stringsbwarsaw2002-02-231-7/+56
| | | | | | | | | | | | | | | | | to not include the %()s chrome. We might be using the new experimental $-strings. This leaves the instructions with a something left to be desired, but it should be okay for now, and I don't want to add two descriptions, one for %-strings and another for $-strings. HandleForm(): We break the handling of the Autoresponse attributes into a special method which does some sanity checking on the interpolation strings. First, it checks to see if we're using the new experimental $-strings, and then depending on the style of interpolation being used, it extracts the identifiers (variables) in the string and compares them against a known valid list. Any invalid variables are flagged and the changes are discarded. If the user simply left off a trailing `s' (as in %(foo)s), then this can be corrected, but a warning is still printed.
* decorate(): When the mailing list object has a true attributebwarsaw2002-02-231-2/+16
| | | | | | | | | | | | use_dollar_strings, this means the list has been converted from the traditional (and error prone) %-substitution strings to the new experimental $-substitution strings. We need to internally convert the $-strings back into (safe) %-strings to utilize Python's string mod operator. process(): Apply Ben Gertzfield's patch to only add the header via text/plain concatenation when the character set of the list's default language matches the charset of the message.
* process(): When the mailing list object has a true attributebwarsaw2002-02-231-0/+3
| | | | | | | | use_dollar_strings, this means the list has been converted from the traditional (and error prone) %-substitution strings to the new experimental $-substitution strings. We need to internally convert the $-strings back into (safe) %-strings to utilize Python's string mod operator.
* Someone -- I forgot who :( -- made a suggestion that list_membersbwarsaw2002-02-231-26/+92
| | | | | | | | | | | | | | | | | | | should be able to filter on nomail (i.e. delivery disabled) as well as the kind of digest being received. I liked the idea, but wasn't keen on the new command line switches, so I reimplemented it using optional arguments on the switches. Sadly, this means we can't use getopt, but still, it's not that hard to hand code. getopt-sig to the rescue! Specifically, -d/--digest grow an optional argument, and added the -n/--nomail switch. statusp(): Returns a boolean specifying whether the nomail filter matches the delivery status of the member. main(): New option parsing code, and added the filters described above.
* A new script for bin/withlist which converts thru-the-webbwarsaw2002-02-230-0/+0
| | | | | interpolation strings from %-style to the new experimental (but less error prone) $-style.
* intermediatebwarsaw2002-02-231-0/+36
|
* NONSCRIPTS: Add the new convert.py "withlist" script.bwarsaw2002-02-231-1/+1
|
* Update imports for the new rules on shadowing standard librarybwarsaw2002-02-233-8/+10
| | | | | | | | | modules. Specifically, import the email package /after/ we've imported paths. Also, in add_members: change the import of StringIO to use the Python standard cStringIO module, which we can now pretty much guarantee to be there.
* Update imports for the new rules on shadowing standard librarybwarsaw2002-02-231-7/+5
| | | | | modules. Specifically, import the email package /after/ we've imported paths.
* Some new path-hacking code:bwarsaw2002-02-231-6/+7
| | | | | | | | | | | | | | | | | | | | | - Stick $prefix/pythonlib on the front of sys.path. I've gone back and forth about this for a long time; the question is: for modules that Mailman provides which override the ones in the Python standard library, should they explicitly import our overrides or implicitly import them due to sys.path hacking? I used to want the former, but now I want the latter because it makes code maintenance easier (we don't have to modify a bunch of files when we add or get rid of a shadow module). Yes, this violates explicit over implicit, but I think it's for a good cause. I may regret this some day <wink>. - Go back to appending site-packages to sys.path instead of prepending it. This makes it semantically more similar to the hacking that goes on in site.py. We also don't need for site-packages to be earlier in the path because of the above new rules for shadowing. Remember that we start up the CGI scripts with python -S, so we still need to get site-packages on sys.path (probably).
* install: subscribe and unsubscribe are now aliases for join and leave.bwarsaw2002-02-231-0/+5
|
* VALID_COMMANDS: Add `subscribe' and `unsubscribe'.bwarsaw2002-02-231-0/+2
|
* There's a new Spanish translation champion. Also, update thebwarsaw2002-02-234-2/+164
| | | | todo.html list from the new TODO file.
* A bunch of new ideas we'll get to some day <wink>.bwarsaw2002-02-231-0/+10
|
* _addlist(): Do some better formatting. -unsubscribe is now thebwarsaw2002-02-231-2/+2
| | | | longest alias. Also, there's no need to add 1 to the field size.
* makealiases(): Add -subscribe and -unsubscribe as aliases for -joinbwarsaw2002-02-231-1/+2
| | | | and -leave respectively.
* Several changes which should make the installer's life easier. First,bwarsaw2002-02-231-33/+15
| | | | | | | | | | | | | | give some hints about how to install Python itself from source. Second, remove all the cruft about having to manually install the email package; we'll do that for them now. Fix some typos (can't remember who reported these, sorry). --with-ownername change to --with-username, and --with-ownergroup changed to --with-groupname. Also, update for information about the `mailman' init script which is now installed to scripts/mailman. And fix a couple of $prefix/mail/wrapper->.../mailman typos.
* Automatically uncompress and distutils install the distributed emailbwarsaw2002-02-231-2/+10
| | | | | | | | | package into $prefix/pythonlib, which we will arrange to be at the head of sys.path, so as to override the standard package even in Python 2.2. The human installer now should no longer need to install the email package manually for any version of Python.
* Deprecate the Mailman/pythonlib directory. First, most if not all ofbwarsaw2002-02-237-2464/+0
| | | | | | | | the modules are now unnecessary because we're going to require at least Python 2.1.x and it should have relatively bug-free versions of these modules. Second, if we find we need to override standard modules, we have a different way of doing it now (by path-hacking in a pythonlib directory one level up into the front of sys.path).
* show_post_requests(): Be sure to cgi.escape() the header text we'rebwarsaw2002-02-231-3/+3
| | | | | | | displaying so that nasty HTML can't sneak in. Also, set the readonly attribute to true when creating the Message Headers and Message Excerpt text boxes. This avoids the misperception that you can edit the message before it's approved.
* addError(): New method added to class Document, which is essentially abwarsaw2002-02-231-5/+18
| | | | | | | | | | | | replacement for the function in the admin.py module. This makes it much easier for gui component HandleForm() methods to add an error or warning to the admin page. TextArea.__init__(): Add a `readonly' argument, which translates to the TEXTAREA tag getting a READONLY attribute. We'll use this to turn the header and body excerpt text boxes in the admindb pages to read-only (avoiding the common misperception that you can edit the message before it's approved).
* __setstate__(): When unpickling Message instances, check to make surebwarsaw2002-02-231-0/+6
| | | | | | | | | | | | | | they have a _charset attribute, adding a default one if not. This should fix a problem I think Dan Mick had, which I believe is caused by a Message object being pickled w/ version 0.96 of the email package, and unpickled by 0.97/1.1 of the email package. Why doesn't this go into email.Message.Message? Because I don't want to clutter its code up with something that should both be transient and assumes that Message is pickled. Mailman seems more responsible for the pickle consistency (if every Python class that grew an attribute had to have such schema migration code, we'd be up sh*ts creek).
* Remove `pythonlib' from SUBDIRS. We're getting rid of thebwarsaw2002-02-231-2/+2
| | | | | Mailman/pythonlib subdirectory in favor of an alternate location when/if necessary.
* Bump copyright years.bwarsaw2002-02-231-1/+1
|
* Use the mailbox module from the Python standard library, instead ofbwarsaw2002-02-231-1/+1
| | | | | | our Mailman/pythonlib version. We don't use the extra hack in our version anyway, AFAICT (i.e. the addition of a seek() method which just deferred to the underlying file object).
* We can now get rid of the special admin director and just treat thatbwarsaw2002-02-141-11/+2
| | | | suffix like all the others.
* Bump the copyright years.bwarsaw2002-02-142-2/+2
|
* clear(): Fix the file names given to _zapfile().bwarsaw2002-02-141-2/+2
|
* makealiases(): Remove the special case for the `admin' script; it'sbwarsaw2002-02-141-2/+1
| | | | treated like all the other scripts now.
* Copy the bounces script to the admin script. This is for backwardsbwarsaw2002-02-141-0/+1
| | | | compatibility.
* VALID_COMMANDS: To make life easier, we'll include `admin' as a validbwarsaw2002-02-141-0/+1
| | | | | mail program. The installation procedure will copy the bounces script to the admin script. This is for backwards compatibility.
* Updates based on my experiences in getting Exim to work w/ Mailmanbwarsaw2002-02-121-136/+94
| | | | 2.1.
* Sigh. Import order is now essential for command line scripts so thatbwarsaw2002-02-121-3/+5
| | | | | we path-hack before we try to import any email module. We'll need to do an audit of all the command line scripts.
* A slightly cleaner way to do the freshening of MailList objects.bwarsaw2002-02-121-7/+6
| | | | | | | | | run(): After once through the loop, look at the freshen flag and if true, clear the cache. Thus all subsequent MailList objects will get updated state, but we'll gain the performance benefits of the cache for each iteration the the big loop. _open_list(): Return this function to its original state.
* __init__(): Default the self._freshen attribute to zero.bwarsaw2002-02-121-2/+13
| | | | | _open_list(): If we've pulled the list object from the cache, then freshen the state by re-Load()-ing it.
* __init__(): Set self._freshen so that the MailList cache in the basebwarsaw2002-02-121-9/+7
| | | | | | | | class knows to reload the state when pulling the object from the cache. Hmm, why do we even have a cache now? _dispose(): Don't do the `verp' key calculation here; it's done earlier and better in the ToOutgoing.py handler.
* process(): Set the `verp' key in the metadata here, based on post_idbwarsaw2002-02-121-1/+13
| | | | | | | and VERP_DELIVERY_INTERVAL. We used to do this in OutgoingRunner, but that was inconvenient due to the latter never freshing the state of MailList objects (that's fixed, but this is still a better place to set this key).
* run_main(): Because the site-packages path hacking no longer happensbwarsaw2002-02-121-6/+2
| | | | | | | | in Defaults.py, we need to arrange for this script to import paths.py to pick up the correct site-packages prefixed sys.path. Because we do this, we can delete the sys.path.insert() call, which was redundant.
* Move the path hacking addition of the site-packages directory to herebwarsaw2002-02-121-2/+13
| | | | | | | | | from Defaults.py.in. The problem is that even for Python 2.2, we need site-packages to appear /before/ the standard library so that we can pick up the newer version of the email package. Defaults.py/mm_cfg.py is usually imported too late in the game to work, but paths.py is about right (although we'll have to audit the command line scripts to make sure they import paths.py before they import email.*).
* Move the path hacking addition of the site-packages directory to thebwarsaw2002-02-121-10/+1
| | | | | | | | | paths.py.in file. The problem is that even for Python 2.2, we need site-packages to appear /before/ the standard library so that we can pick up the newer version of the email package. Defaults.py/mm_cfg.py is usually imported to late in the game to work, but paths.py is about right (although we'll have to audit the command line scripts to make sure they import paths.py before they import email.*).
* Czech updates from Dan Ohnesorg.bwarsaw2002-02-1218-566/+817
|
* main(): First, set the global language to the list's preferredbwarsaw2002-02-112-13/+21
| | | | | | | | language for the email message that's sent out. Then do the translation and UserNotification generation, then reset the language context and send the message. Patch by Ben Gertzfield, modified by Barry.
* SendExplanation(), main(): First, set the global language to thebwarsaw2002-02-111-10/+22
| | | | | | | | list's preferred language for the email message that's sent out. Then do the translation and UserNotification generation, then reset the language context and send the message. Patch by Ben Gertzfield, modified by Barry.
* create(): When creating the UserNotification message object, pass inbwarsaw2002-02-111-2/+2
| | | | | | | the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* process(), hold_for_approval(), do_discard(): When creating thebwarsaw2002-02-114-10/+7
| | | | | | | | UserNotification message object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.
* Update bundled email package to 0.97 for support of multibytebwarsaw2002-02-112-0/+0
| | | | character sets.
* process_request(): When creating the UserNotification message object,bwarsaw2002-02-111-2/+2
| | | | | | | pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield.