summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* This file was never published in yr 2000.bwarsaw2001-05-141-1/+1
|
* enqueue(): The `received_time' metadata (which is set here once, butbwarsaw2001-05-141-22/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only if it has no prior value), is encoded into the file name so that we can guarantee FIFO order on the processed files. We can't encode the received time in the file attributes because there isn't enough precision (and I suspect that stat'ing all those files will be too much of a disk I/O drain). Instead, the filebase is composed of the string representation of the current time in float seconds, the symbol `+', and the SHA1 hexdigest of a hash of the uniquifying data. This makes it easy and quick to decode received time for FIFO sorting, but retains the "random" digest for bitrange slicing. Note that the received_time metadata value is never changed once its set so the first part of the filebase will remain unchanged as it moves between queues (while the hexdigest will almost definitely change on each queue move). dequeue(): Be more robust about missing .msg or .db files when the other exists (usually, it'll be the .msg file that's missing). Return None for either the msg or data part of the 2-tuple return value, where None means "missing". files(): Utililize the new file naming convention to break apart the file name and sort the files in FIFO order, while still retaining the bitrange random hash feature. MarshalSwitchboard: All Python versions up to and including Python 2.1 have a bug in the marshal representation of binary floating point numbers. Specifically, it loses precision that Mailman requires. The solution in this class is to have a hardcoded list of known float attributes, convert them to strings via repr() before marshaling the dictionary, and convert them back to floats -- via a safe eval() -- when reading the marshal back from file.
* __oneloop(): Guarantee FIFO order on the processed messages. Webwarsaw2001-05-141-16/+23
| | | | | | | | | | assume that the list of files coming back from Switchboard.files() is sorted by received time, so we don't need to randomize this list. Also, it's now possible for Switchboard.dequeue() to return None for either or both of msg and msgdata (say if the .msg file for a .db file got lost somehow). Check that both are not None before proceeding (but if either is None, log an error).
* process(): We don't need to set the `received_time' metadata item,bwarsaw2001-05-141-1/+0
| | | | since this is guaranteed to be filled in by the runner.
* reap(): It's possible under some circumstances to get an ECHILD frombwarsaw2001-05-141-1/+8
| | | | | the os.waitpid() call. This means there are no children left so we can just clear the dictionary and return.
* get_item_gui_description(): Can't add two Label() widgets, so formatbwarsaw2001-05-111-2/+2
| | | | them to plain text first.
* ProcessConfirmation(): Fix tuple unpacking typo in unsub confirmation.bwarsaw2001-05-111-1/+1
|
* _dispose(): Add support for mylist-join and mylist-leave aliases. Thebwarsaw2001-05-111-0/+10
| | | | | | | | | | | | mail scripts simply add metadata `tojoin' or `toleave' respectively, which tell CommandRunner which operation to perform. This is a bit crufty since MailCommandHandler.ParseMailCommands() still handles the actual job of adding or deleting the member. CommandRunner hacks the Subject: line of the message to add just the specific desired command, and it empties the message's payload (effectively ignoring any additional commands or useless text in the email message).
* De-string-module-ification.bwarsaw2001-05-111-31/+33
|
* checkperms(): aliases.db should be owned by mailman now, not root.bwarsaw2001-05-111-2/+2
|
* create(), remove(): Before we write to the aliases.db file, we mustbwarsaw2001-05-111-2/+47
| | | | | | drop an exclusive advisory lock on it, so Postfix doesn't try to read the file while we're updating it. See the comment at the top of the file for a discussion of why we have to do this so cruftily.
* intermediatebwarsaw2001-05-101-0/+46
|
* List creation/removal hooks now keep both the plain text filebwarsaw2001-05-101-29/+120
| | | | | | | | | | | | | | | | | | | | | | | | `aliases' and dbhash file `aliases.db' in sync. Specifically, _addlist() => addlist() _rmlist(): Removed. addlist(): This now takes both a dbhash file and a file pointer to the plain text file and adds the new list entries into both. If the plain text file is empty (seek to end, tell() == 0), then an informative comment is added to the top. In the plain text file, `stanza' marker comments are used around the list alias entries. A trailing blank line is always added after the stanza. create(): This is now just a wrapper for addlist() (since addlist() is now used by bin/genaliases). remove(): Does the bulk of what _rmlist() used to do, plus it keeps the plain text file in sync. It searches for the appropriate stanza marker and removes every line between it and the stanza end marker. (Actually, it does this by copying to a tmp file and shuffling the tmp file to the real file.)
* Add a "notify list owner?" widget, defaulting to Yes.bwarsaw2001-05-101-15/+31
|
* checkperms(): Postfix-specific permission checks: make sure thebwarsaw2001-05-091-2/+48
| | | | | aliases.db file is perm'd 066x and that it's owned by root. The group-ownership by mailman is already checked by check_perms.
* process_request(): Allow any of the following passwords to be used tobwarsaw2001-05-091-1/+3
| | | | delete a list: list-owner, list-creator, site-admin.
* Added option to auto-generate list-admin password. The passwords willbwarsaw2001-05-091-7/+38
| | | | | | | | | | | | be 8 characters long. If auto-gen is selected, the password and confirm fields MUST be empty. process_request(): Get the autogen value out of the cgi data. Also, change the sanity checks to ensure that if autogen is selected, password and confirm are empty, and only do the other password & confirm sanity checks when autogen is false. request_creation(): Support the auto-gen of list passwords.
* intermediatebwarsaw2001-05-091-1/+0
|
* Checking in the usual .cvsignore, Makefile.in, and __init__.py files.bwarsaw2001-05-094-0/+159
| | | | | Also, Postfix.py which contains the Postfix-specific code to run when creating or removing a mailing list.
* intermediatebwarsaw2001-05-091-2/+0
|
* intermediatebwarsaw2001-05-091-1/+0
|
* CGI scripts for through-the-web creation and deletion of mailing lists.bwarsaw2001-05-092-0/+500
|
* _dispose(): Oops! Remove an outdated comment.bwarsaw2001-05-091-3/+1
|
* _dispose(): Add a new header X-List-Received-Date: which contains thebwarsaw2001-05-091-1/+4
| | | | | | time that Mailman received the message. This header only goes into the archived copy of the message (header name and semantics were discussed on mailman-developers).
* listinfo_overview(): The hostname/domain grokking code was moved intobwarsaw2001-05-091-16/+4
| | | | Utils.get_domain().
* success(): By adding default arguments, we can do the unpacking ofbwarsaw2001-05-091-3/+1
| | | | data `automatically' instead of in this function.
* admin_overview(): Add a link to the site-wide `create' cgi page forbwarsaw2001-05-091-18/+23
| | | | | | | | | | | | | | | | creating new mailing lists. show_results(): Under "Other Administrative Activities", add a little bit of space before the Logout entry. Also, if OWNERS_CAN_DELETE_THEIR_OWN_LISTS is true, add a link just above Logout to the rmlist cgi script for deleting the mailing list. get_item_gui_description(): Use the new Label widget instead of inlining the <div> tags. password_inputs(): The PasswordBox widget now has a default size of TEXTFIELDWIDTH, which is too big for these particular fields. Crank the size down to 20.
* ValidAdminPassword(): CheckSiteAdminPassword -> check_global_passwordbwarsaw2001-05-091-2/+2
|
* Added the Label widget/class, which is a Container that aligns itsbwarsaw2001-05-091-3/+16
| | | | | | | | | | elements on the right edge. PasswordBox: contructor now takes a size argument, which defaults to mm_cfg.TEXTFIELDWIDTH. TextBox: constructor's size argument now defaults to mm_cfg.TEXTFIELDWIDTH instead of 10.
* SetSiteAdminPassword() -> set_global_password(): Also, add optionalbwarsaw2001-05-091-9/+53
| | | | | | | | | | | | | | argument `siteadmin' which if true reads the SITE_PW_FILE (default is true). When false, it reads the LISTCREATOR_PW_FILE. CheckSiteAdminPassword() -> check_global_password(): Same addition of argument. rmdirhier(): Like "rm -r" and unlike os.removedirs(), this recursively deletes everything under a specified directory. get_domain(): Returns the URL hostname/domain as pulled out of HTTP_HOST or SERVER_NAME, and is VIRTUAL_HOST_OVERVIEW aware.
* bumping copyright yearsbwarsaw2001-05-091-1/+1
|
* Recurse into the MTA directory.bwarsaw2001-05-091-1/+1
|
* Create(): Wrap the os.makedirs() in a try/except transforming OSErrorsbwarsaw2001-05-091-2/+7
| | | | | | | | into MMUnknownListError. ProcessConfirmation(): Fix unpacking of the data coming back from Pending.confirm(). op is always the first element, but data is the 1st through nth elements.
* Support for list creation through the web. Specifically,bwarsaw2001-05-091-4/+13
| | | | | | | | | | | | | | | | MTA_ALIASES_STYLE: Removed. MTA: This names a module in Mailman/MTA which contains the MTA-specific code to make the mailer aware of new mailing lists automatically. OWNERS_CAN_DELETE_THEIR_OWN_LISTS: This flag controls whether list owners can delete their mailing lists through the web. If set to false, only the site administrator can delete mailing lists using the command line script. LISTCREATOR_PW_FILE: Specifies where the list creator's password is saved.
* Be more paranoid about abnormal shutdown conditions, specifically:bwarsaw2001-05-031-2/+23
| | | | | | | | | | | | | | | | | | | main(): When the user hits the stop button on their browser during a long running operation, Apache 1.3/mod_cgi will eventually catch a SIGPIPE when output is written to the client. It then turns around and SIGTERMs the cgi process, waits three seconds, then SIGKILLs the cgi process. This patch fixes the stale lock file that can result under this situation. Since Python by default doesn't catch SIGTERM, and SIGKILL is uncatchable, either signal would cause the cgi process to exit without raising an exception, giving no chance for the script to clean up after itself. We now open the MailList object in two phases: first, open it unlocked, then lock it and install a SIGTERM handler. The SIGTERM handler unlocks the list and exits, aborting any changes that may have taken place. This is the safest way to ensure that stale locks won't be left around causing other hits on the list to become wedged for a long time.
* De-string-module-ification.bwarsaw2001-05-032-8/+10
|
* Be more paranoid about abnormal shutdown conditions, specifically:bwarsaw2001-05-031-4/+24
| | | | | | | | | | | | | | | | | | | | | main(): When the user hits the stop button on their browser during a long running operation, Apache 1.3/mod_cgi will eventually catch a SIGPIPE when output is written to the client. It then turns around and SIGTERMs the cgi process, waits three seconds, then SIGKILLs the cgi process. This patch fixes the stale lock file that can result under this situation. Since Python by default doesn't catch SIGTERM, and SIGKILL is uncatchable, either signal would cause the cgi process to exit without raising an exception, giving no chance for the script to clean up after itself. We now open the MailList object in two phases: first, open it unlocked, then lock it and install a SIGTERM handler. The SIGTERM handler unlocks the list and exits, aborting any changes that may have taken place. This is the safest way to ensure that stale locks won't be left around causing other hits on the list to become wedged for a long time. Also, de-string-modulification.
* main(): Add an explicit call to sys.exit() in the sigterm_handler() sobwarsaw2001-05-031-5/+15
| | | | | that race conditions can't trick us into trying to Save() when we don't have the list lock.
* Update comments to sync with 2.0.5 branch.bwarsaw2001-05-031-19/+27
|
* Fixes to handle User-Hits-Stop-Button problems, specifically,bwarsaw2001-05-023-4/+38
| | | | | | | | | | | | | | | | | | | | | | | 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?
* Added missing import.bwarsaw2001-05-011-3/+22
| | | | | | | | | _dispose(): Support for new site-wide date clobbering policy. No longer is the Date: header clobbering a list-specific option, instead ARCHIVER_CLOBBER_DATE_POLICY and ARCHIVER_ALLOWABLE_SANE_DATE_SKEW control how Date: munging happens site-wide (this makes the most sense since the choice of Pipermail vs. external archiver is also made site-wide). See Defaults.py.in for more details.
* CATEGORIES: Changes for readability...bwarsaw2001-05-011-2/+6
| | | | | | | | | | "Regular-member (non-digest) Options" -> "Regular delivery (non-digest) Options" "Digest-member Options" -> "Digest Options" change_options(): Support for pseudo-variables _new_volume and _send_digest_now.
* DEFAULT_DIGEST_VOLUME_FREQUENCY: Default value for the newbwarsaw2001-05-011-1/+14
| | | | | | | | | | | | | | | digest_volume_frequency configuration attribute. Default is to rotate volume numbers monthly. ARCHIVER_CLOBBER_DATE_POLICY: New site-wide configuration variable to control when the Date: header is modified for the archiver. Legal values are 0 (retain original Date), 1 (always override with received date), 2 (only override if the date is outrageous -- see below). Default is to only override outrageous dates. The clobber_date list-specific configuration attribute has been removed. ARCHIVER_ALLOWABLE_SANE_DATE_SKEW: How far away a date must be from current time to be considered outrageous. Default is 15 days.
* mimelib's ReprMixin class and module was renamed to StringableMixin inbwarsaw2001-05-011-3/+34
| | | | | | | | | | | | | | | the 0.3 release. This means you must download and install the 0.3 version of mimelib to work with the current CVS snapshot! ReprMIME => StringableMIME send_digests(): Added support for auto-bumping of digest volume numbers based on the digest_volume_frequency configuration attribute. send_i18n_digests(): After creating the mimedigest container, set its payload to the empty list. This ensures that subsequent add_payload()s will succeed. mimelib 0.3 will raise an exception otherwise when appending to a scalar payload.
* process(): `received_time' should only be added to the message'sbwarsaw2001-05-011-2/+2
| | | | | | metadata if it's not already there. Usually it will be since scripts/post and scripts/auto add it. Python 2.x's {}.setdefault() does this nicely.
* InitVars(), GetConfigInfo(): clobber_date goes away as a list-specificbwarsaw2001-05-011-8/+0
| | | | configuration variable.
* ZapOldVars(): clobber_date goes away as a list-specific configurationbwarsaw2001-05-011-0/+5
| | | | | | | variable. NewVars(): MailList objects grow a digest_volume_frequency and digest_last_sent_at attributes.
* Bump the DATA_FILE_VERSION to pick up the changes to the list objectbwarsaw2001-05-011-1/+1
| | | | configuration attributes.
* GetConfigInfo(): Two new configuration variables have been added:bwarsaw2001-05-011-0/+44
| | | | | | | | | | | | | | | | | - digest_volume_frequency describes how often a new digest volume should be started. Values are Yearly, Monthly, Quarterly, Weekly, Daily. When a new digest volume is started, the volume number is incremented and the next_digest_number is reset to 1 - digest_last_sent_at records when the last digest was sent, used to calculate when a new digest volume should be started. In addition, two new pseudo-variables are added which allow the list admin to start a new volume with the next outgoing digest, and to send the current digest right now, if it isn't empty. send_digest_now(), bump_digest_volume(): New methods to encapsulate sending a digest and bumping the volume number.
* mimelib's ReprMixin class and module was renamed to StringableMixin inbwarsaw2001-05-011-3/+3
| | | | | the 0.3 release. This means you must download and install the 0.3 version of mimelib to work with the current CVS snapshot!