summaryrefslogtreecommitdiff
path: root/Mailman/Cgi
Commit message (Collapse)AuthorAgeFilesLines
...
* We needed *something* by which people can determine the lists theyklm1998-12-171-4/+40
| | | | | | | | | | | | | | subscribe to. I'm adding a button on the user options page that they can click, as long as they provide their password, to get to a page of links to the options pages for all their subscriptions on the current system. It's not very pretty (options.py and handle_options.py are even more packed with miscellaneous stuff, and the page they go to is extremely unrefined), but i think it's not bad for an hour hack, and is needed. (The password protection is necessary since the user options page is visible to anyone, and not having a password would give away the list of private subscriptions.)
* Fixed bogus error message: had to few parameters to satisfy formatklm1998-11-241-3/+3
| | | | | string (now using dict substitution, instead), plus the URL was missing quotes, plus the URL was missing 'mailto:'.
* This is a simple change that limits the extremely expensivecotton1998-11-231-2/+8
| | | | | | | | | | | calculation of html user lists to the roster cgi program. HTMLFormatter: added a .GetAllReplacements() method that does the same thing as GetStandardRepplacements() but also calculates all the html for users lists. Removed the calculation of all the html for the user lists from GetStandardReplacements(). Cgi/roster.py replaced call of GetStandardReplacements() with GetAllReplacements(). scott
* Wrapped a bunch of long lines.klm1998-11-211-8/+12
|
* These changes represent the changes that make mailman's addressingcotton1998-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* added a list.Save() after a successful subscription because the corecotton1998-11-211-2/+1
| | | | | MailList object no longer takes care of this. scott
* I should have broken this up into 2 checkins because it implements onecotton1998-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Cleaned up the change-password table so it looks a bit nicer, andklm1998-11-211-31/+50
| | | | | | | | | | | | | tabbing between entry fields goes in the right sequence. (In the process i separated out the formatting for the Submit button, and i'm wondering whether it makes sense to put a copy of it above the table, as well as below - it can be handy to not have to go to the end of the page to submit. Unfortunately, it looks ugly hanging out up top!) As ever, wrapped a bunch of long lines. Trimmed some odd whitespace (extending beyond margin) at the end of a line.
* Handle non-existant lists by printing a (excessively minimal) errorklm1998-11-201-5/+10
| | | | | page and raising SystemExit, which the driver expects - instead of generating an error that winds up in the error log.
* This change implements storing list members and digest members ascotton1998-11-193-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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%------------------------------------------- ?
* `make distclean' now removes stray .pyc files.bwarsaw1998-11-171-0/+1
|
* virtual host patch to list the proper hostname from g stein.cotton1998-11-091-10/+15
| | | | scott
* change os.path.join to %s/%s for urlscotton1998-11-091-2/+2
| | | | scott
* change os.path.join to %s/%s for urlscotton1998-11-091-5/+4
| | | | | lines 95, 161 scott
* made it use %s/%s instead of os.path.join for url.cotton1998-11-091-1/+1
| | | | scott
* made it use %s/%s instead of os.path.join forcotton1998-11-091-3/+3
| | | | | 2 spots changed: lines 220 and 401 scott
* Mods to work with new archiving scheme.bwarsaw1998-11-031-10/+8
| | | | | | | | | | | | | | ROOT is gone. getListName(): must extract list name differently. GetListobj(): Interface change! Allow Errors.MMUnknownListError to propagate up. Returning None is not helpful because this will generally cause an AttributeError later on, and that just masks the real error, which is that the list name was not found. main(): when file isn't found, include the true_filename in the message (for debugging - shouldn't normally happen).
* GetArchiveList(): Use new Archive.archive_dir() methodbwarsaw1998-11-031-1/+1
|
* Made the script not crash when called without a listname in thecotton1998-10-281-1/+5
| | | | | | | url. when the url doesn't append anything after the /subscribe, there is not PATH_INFO defined, throwing a KeyError. Now the cgi returns an error page indicating that the url is missing a listname. scott
* *** empty log message ***cotton1998-10-261-2/+7
|
* robustified:cotton1998-10-231-1/+7
| | | | | | | | admindb assumed that there was the environmental variable "PATH_INFO". If there is not, as would be the case if someone visited <base-url>/admindb, then it would throw a key error. Now it says that the user should specify a list name. scott
* changed the site site variable ADMIN_MEMBER_CHUNKSIZE to a per-listcotton1998-10-231-2/+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
* Removed gratuitous (probably residual) import of Pending module.klm1998-10-221-1/+1
|
* make finishbwarsaw1998-10-201-0/+3
|
* Instead of hardcoding ROOT, calculate its value using mm_cfg.PREFIX,bwarsaw1998-10-201-1/+2
| | | | which contains the installation directory as determined by autoconf.
* corrected misspelling of "address".cotton1998-10-201-1/+1
| | | | scott
* FormatListinfoOverview(): Use new VIRTUAL_HOST_OVERVIEW defaults valueklm1998-10-181-4/+5
| | | | | | | | to determine whether or not to constrain the overview to only those lists whose 'web_page_url' setting is found in the URL of the visite page. Also, corrected from using the 'host_name' setting for reference, because it (as dragon de monsyne pointed out) is relevant for email, not web purposes.
* Hookup for umbrella notice.klm1998-10-171-1/+4
|
* options cgi was still lowercasing user's inputted email addresscotton1998-10-141-1/+1
| | | | | | instead of just the domain part. this was preventing some users with caps in their usernames from logging onto the options section scott
* This is the same typo fix that john checked in the other day which preventedcotton1998-10-141-1/+1
| | | | | | listowners from unsubscribing digest members. I don't know how it got back in the code! scott
* added option to override list value for wend_welcome_msg when mass subscribing.cotton1998-10-111-3/+13
| | | | scott
* Better check this in while I'm thinking about it ;-)viega1998-10-111-1/+1
| | | | | Fixed a typo that prevented digestified users from unsubscribing via the web.
* These changing are a cleanup of the sorry state the subscription policycotton1998-10-102-58/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* whoops, the last fix was backwards.cotton1998-10-091-3/+3
| | | | scott
* fixed bug where mass subscribe wasn't checking whether or not to sendcotton1998-10-091-1/+5
| | | | | welcome message as per the list config. scott
* All these changes are for implemented integrated pipermail based archives.cotton1998-10-091-98/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* The cookie mechanism was causing a binascii.error: Incorrect Paddingcotton1998-10-081-12/+6
| | | | | | error to be raised with MSIE on a MAC. I have simplified the encodeing to simply be `hash(list_name)`. scott
* there was a small bug where if someone didn't enter an emailcotton1998-10-061-0/+5
| | | | | address, the script would throw a NameError scott
* The chunk indices on the membership management page werecotton1998-10-011-4/+4
| | | | | | | broken for lists that didn't use the default /mailman ScriptAlias. admin.py now uses list.GetAbsoluteScriptURL('admin'), which should apply to virtual hosts and other odd configurations scott
* A checkin i neglected to do yesterday.klm1998-09-071-38/+29
| | | | | | | | | main() - reorganized the order of activities around the confirmation request notice, so that validation of the addr and posting on the confirmation queue, etc, are successfully done before sending the notice. Otherwise, we were getting confirmation requests sent when, eg, the person was already a member of the list - but the subscription wasn't in the confirmation queue, 'cause it was invalid...
* main(): Register all pending attempts to subscribe in the "subscribe"klm1998-09-051-4/+17
| | | | | log file, in addition to the already logged subscription finalizations and deletions.
* main(): Deny subscription attempts of a list to itself - and log aklm1998-09-051-7/+25
| | | | | message in the new log file, "mischief" indicating the error and, if available, the identity of the host where it originated.
* A failed confirmation of the user password was causing 1 - success -klm1998-09-041-1/+1
| | | | | | | | | to be returned, and in fact, valid *and* invalid passwords were being accepted as sufficient authorization - since before 1.0b5, probably as of 1.0b4! (At least, since v 1.2 of this file.) Thanks to greg stein for noticing that invalid passwords were accepted.
* Scott's patch to "path" string interpolation value when REQUEST_URIbwarsaw1998-08-071-1/+2
| | | | doesn't exist (as in older versions of Apache).
* CGI_MODULES: *.py instead of error-prone explicit listbwarsaw1998-07-311-3/+1
|
* call_script(): Two fixes: first past `list' in as a parameter so youbwarsaw1998-07-311-4/+5
| | | | | | | | don't accidently get the built-in list function. Second, import and run main() of the passed in `which' script, which seems currently to be only options.py. Q: How did this ever work???
* PrintRequests(): happened to notice a typo while here.klm1998-07-201-2/+3
|
* PrintRequests(): call to list.RequestsPending() becomesklm1998-07-201-1/+1
| | | | list.NumRequestsPending() (missed this one when i made the change).
* Neglected to apply format value for 'remote', to be used in theklm1998-07-131-1/+1
| | | | verify.txt.
* Recognize and refuse, in an informative way, subscription requests forklm1998-07-121-4/+10
| | | | | | already-subscribed members. (Wrapped a couple of long lines.)