summaryrefslogtreecommitdiff
path: root/Mailman/versions.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert from mlist.LogMsg() inteface to new syslog() interface forbwarsaw2000-06-031-3/+4
| | | | logging.
* UpdateOldVars(): Bug fix for schema updates. This used to setbwarsaw2000-03-211-4/+6
| | | | | | member_posting_only to 0 unconditionally -- which could whack the value on every schema update. Now we only do this when upgrading from data_version 10 or earlier.
* Conversion of Mailman 1.1 pending admin database to 1.2/2.0 externalbwarsaw2000-03-161-12/+48
| | | | | | | | | | | | | requests.db database. This should be the last major hurdle for the new version. Specifically, NewRequestsDatabase(): This knows about the 1.1 style mlist.requests dictionary, which served as the pending requests database. It sucks everything out of this dict and resubmits the requests using the new APIs. Worst thing that happens its that the timestamps get blown away. Oh well. older(): Removed since it's not used anywhere.
* NewVars(): initialize reply_goes_to_list to the empty string.bwarsaw2000-03-031-0/+1
|
* NewVars(): added autorespond_requests and autoresponse_request_text.bwarsaw2000-02-261-0/+2
|
* CanonicalizeUserOptions(): Emergency patch. A user_options key canbwarsaw2000-02-191-0/+2
| | | | apparently be None, which makes no sense, so we skip it.
* Update(): Call NewVars(), a new function.bwarsaw2000-02-191-7/+30
| | | | | | | | | NewVars(): Set the various attributes for the autoresponder if they don't exist yet. Even though the comments say this shouldn't be necessary, because InitTempVars() should take care of it, I don't think that really works anymore. NewVars() is necessary so that the new mixin class attributes get initialized on existing mailing lists which are restored from disk after the code gets updated.
* Update(): Call CanonicalizeUserOptions()bwarsaw1999-07-031-0/+15
| | | | | CanonicalizeUserOptions(): New function that merges all mixed-case-keyed user_options and stores them using lower case keys.
* UpdateOldVars(): Fixed a lurking buglet. If the mlist.members andbwarsaw1999-03-291-18/+41
| | | | | | | | | mlist.digest_members dictionaries have already been converted to lowercase-only keys, any key with a case-preserved value would have been lost by being overwritten with 0. :-( UpdateOldUsers(): Implement the mlist.passwords constraints fix. The keys of this dictionary are now guaranteed to be lowercased.
* These changes represent the changes that make mailman's addressingcotton1998-11-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | work like unix mail: username portions of addresses are case-preserved for delivery only. All other address comparisons are lowercase. up'd data version in Defaults to 13 ** MailList.py: added an __AddMember method that takes an address and whether or not it is a digest address as args and populates the member dictionary like this: if string.lower(addr) == LCDomain(addr): member_dict[addr] = 0 else: member_dictp[string.lower(addr)] == LCDomain(addr) added .GetDeliveryMembers() and .GetDigestDeliveryMembers() methods for use by posting and digest delivery mechanisms. changed a nested def portion in Post to use an explicit loop. **Digester.py: uses .GetDigestDeliveryMembers instead of .GetDigestMembers(). **Utils.py: address comparisons are lc. **versions.py: populate the member dicts according to the above formula. **Cgi/admin.py: fixed a bug introduced from the first change to using member dictionaries: all members were showing up as digest members on the admin membership page. changed a dict.get to dict.has_key to fix this. NOTE: this code is tested only insofar as I posted and poked around on the cgi's a bit, and let lists do the versions code. These changes should be tested more, but I *have* to go now and wanted to check them in before someone made it difficult to do so by changing stuff tomarrow, cause i'm gone all day tomarrow. scott
* I should have broken this up into 2 checkins because it implements onecotton1998-11-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix and one addition. Sorry, i realized that too late. This change adds another list conifg variable "admin_notify_mchanges", which is a boolean 0 or 1 and specifies whether or not the list admin gets notifications of subscriptions and unsubscriptions. The functions MailList.DeleteMember and MailList.ApprovedAddMember trigger the delivery if it is turned on for the list or passed in as an optional argument. This way, it is the duty of programs/code that do mass subscriptions/unsubscriptions where this notification may not be appropriate to specify that in the call to .DeleteMember or .ApprovedAddMember. There are 2 new templates, adminsubscribeack.txt and adminunsubscribeack.txt which are used in sending these notifications. Defaults.py.in has a variable "DEFAULT_ADMIN_NOTIFY_MCHANGES" which is set to 0 so that old lists will act the same by default, and the data version is up'ed to 12. versions.py sets the variable if it's not already there for a list. The config info for the admin cgi program for this new variable is set right after the variable for immediate notifications. The second change is a fix where ApprovedAddMember was calling a "self.Save()", which made mass subscribe situiations really far too slow. I removed the .Save() from there and added it to the more outer level code in the following places: bin/convert_list Mailman/ListAdmin.py Mailman/MailCommandHandler.py Mailman/Cgi/admin.py Note that since AddMember can trigger a call to ApprovedAddMember, all the places where AddMember is called needed a .Save() added as well. I need to add a call to .Save() for Mailman/Cgi/subscribe.py as well and will do that in a moment. scott
* Removed the outdated inversion of the mime-digest format field - whenklm1998-11-191-58/+4
| | | | | | | | | the data_version format changed, the comparison was invalidated. The correction itself is old enough, and specific enough to a small window of versions, that we are better off without it. Cosmetic changes - wrapped a long line, removed some extraneous vertical whitespace...
* This change implements storing list members and digest members ascotton1998-11-191-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del This change implements storing list members and digest members as dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. Though INSTALL shows up on the changed files section, a diff a few seconds ago didn't show any differences in that file, so I hope nobody changed it in the interim. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del list.[digest_]member instead of list.[digest_]members.remove when figuring who to actually send digests to, use list.GetDigestMembers() instead of list.digest_members. Mailman/HTMLFormatter: now uses list.Get[Digest]Members to get subscribers, and length of digested subscribers and regular members MailCommandHandler, SecurityManager,Cgi/handle_opts, Cgi/options: all simple replacements of list.[digest_]members with list.Get[Digest]Members(). Mailman/Cgi/admin.py: mostly simple replacements of list.[digest_]members with the Get..() methods, however, the membership management section now works much quicker and changes digest->nodigest subscriptions via dictionary manipulations. Mailman/versions.py: updates lists to use dicts and changed list.[digest_]members to use the list.Get[Digest]Members() methods. Mailman/Utils.py: added a function "GetPossibleMatchingAddresses" which when fed an address, returns the list of addresses that "smart" address matching would match. changed FindMatchingAddresses(name, list) to use a new signature: FindMatchingAddresses(name, *dicts), where dicts is a list of dictionaries keyed by addresses. Just realized that this would better be FindMatchingAddresses(name, dict, *dicts) so that it enforces atleast 2 args... I'll make that change in a sec. All uses of FindMatchingAddresses have been changed to fit the new arguments. scott ----:**-F1 cvs30458aaa 1:12PM 0.98 Mail (Text Fill)--L59--32%------------------------------------------- ?
* took out posters_includes_members in favor of having it reference thecotton1998-11-011-3/+16
| | | | | | | | member_posting_only variable. made it so that old lists not expecting this behavior will have member_posting_only turned off in the event that they have posters defined (preserving the old behavior where defining posters made the list act as if member_posting_only was set to "no" whether or not it was set as such).
* changed the site site variable ADMIN_MEMBER_CHUNKSIZE to a per-listcotton1998-10-231-0/+2
| | | | | | | | | | | | | | | | | variable (admin_member_chunksize). this is not yet settable by means of cgi, but you can set it at an interactive python session. This is a start on making the membership management part of the admin cgi scalable for really big lists. details: * up'd DATA_FILE_VERSION in Mailman/Defaults.py.in * replaced ADMIN_MEMBER_CHUNKSIZE with DEFAULT_ADMIN_MEMBER_CHUNKSIZE in Mailman/Defaults.py.in. * added a list variable assignment in Mailman.MailList.InitVars * added code to add the admin_member_chunksize attribute to a list when versions change in Mailman/versions.py * made admin.py format members according to list.admin_member_chunksize instead of mm_cfg.ADMIN_MEMBER_CHUNKSIZE scott
* UpdateOldVars(): Added optional val to PreferStored() to make it easyklm1998-10-221-10/+17
| | | | | | to specify a default value to be used when the old setting does not exist. Using it for new umbrella_list option - some upgraded versions may not have had the interim reminders_to_admin setting...
* Accommodating change of umbrella-lists variable,klm1998-10-171-0/+1
| | | | | "DEFAULT_REMINDERS_TO_ADMINS" => "DEFAULT_UMBRELLA_LIST". See recent checkin for Mailman/Defaults.py.in for explanation.
* added posters_includes_members variable which determines whether or notcotton1998-10-121-1/+3
| | | | | | the posters variable includes members addresses. fixed typo in previous checkin for administrivia (setatrr instead of setattr). scott
* added adminitrivia filter and an "administrivia" list attribute thatcotton1998-10-121-0/+2
| | | | | | | | | | | | | | | | | is editable via the admin cgi to turn the filter on and off. I'm sure that the filter could catch more things, but it will have less false positives than majordomo anway :) a listing of the specific changes follows: Defaults.py.in changed data file version and added DEFAULT_ADMINISTRIVIA Utils.py added a function IsAdministrivia(msg) that does the filtering replaced re.sub with string.replace(much faster) in (Un)ObscureEmail. MailList.py: added the config info for the administrivia variable, and made the post method check it if the list has the variable set. versions.py: make new lists have an administrivia variable scott
* These changing are a cleanup of the sorry state the subscription policycotton1998-10-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* All these changes are for implemented integrated pipermail based archives.cotton1998-10-091-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original patches are from The Dragon de Monsyne with the following changes: -added support for private archives as well as public -added support for archiving daily and weekly -made archiving happen in real time -replaced use of pipermail's BSDBDatabase with homegrown python version -took out the need for DocumentTemplate here's a listing of changed files and relevant changes: Makefile.in - added public_html/archives to installdirs Mailman/Archiver.py - changed ArchiveMail to do real time archiving Mailman/Defaults.py.in - added archive frequency and and archive url extension variables Mailman/MailList.py - changed .Save() to alter perms on public vs. private archives Mailman/htmlformat.py - changes directly from The Dragon do Monsyne's patches. I don't know what they are exactly, but all the cgi's seem to work fine, so I assume they are OK. Mailman/versions.py - changes to add archiving based variables back to the list Mailman/Cgi/private - changed to make it work with default installation and made background white on login page src/Makefile.in - changes to make all wrappers setuid mailman: since various processes may access an archive, and the archiving mechanism uses "chmod", all archives must be owned by mailman, so all wrappers need to be owned by and setuid mailman added files: Mailman/HyperArch.py - from The Dragon de Monsyne with changes made noted above Mailman/HyperDatabase.py - the replacement for pipermail.BSDBDatabase scott
* Removed RCS crudbwarsaw1998-06-191-1/+0
|
* Fixed a bug that arose from changing file format versions to a number.viega1998-06-121-42/+45
| | | | | | | | Commented out code that expected a string. It's now a number just so every time mailman starts up there isn't a whole lot of work done in checking the version, etc. Our numbers should stick with integers... other people making local mods should probably use decimal places...
* Fixed a typo in the zipcode.viega1998-05-261-2/+2
|
* Added copyright notices to all source files where I am legally entitled to ↵viega1998-05-251-1/+18
| | | | | | | 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?)
* Routines which rectify an old maillist with current maillist structure.klm1998-04-121-0/+113
The maillist .CheckVersion() method looks for an old .data_version setting in the loaded maillist structure, and if found calls the Update() routine from this module, supplying the list and the state last loaded from storage. (Th state is necessary to distinguish from default assignments done in the .InitVars() methods, before .CheckVersion() is called.)