summaryrefslogtreecommitdiff
path: root/Mailman/MailList.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Create(): Add a call to CheckValues() so that even if DEFAULT_URL isbwarsaw2001-05-161-0/+1
| | | | | misconfigured in mm_cfg.py to be missing a trailing slash, one will be added upon list creation.
* ProcessConfirmation(): Fix tuple unpacking typo in unsub confirmation.bwarsaw2001-05-111-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 the new confirmation scheme for both subscriptions andbwarsaw2001-04-021-14/+55
| | | | | | | | | | | | | | | | removals. Specifically, AddMember(): Use the new Pending.new() function interface, which requires that an appropriate operation key come first. ProcessConfirmation(): Include more detail on the MMBadConfirmation exceptions. Decode the operation key first to see whether we're doing a SUBSCRIPTION or an UNSUBSCRIPTION confirmation. The latter is new and simply calls DeleteMember() if confirmed. ConfirmUnsubscription(): Similar to subscription confirmation, this generates a response with the removal confirmation instructions and url.
* AddMember(): Use the new Pending module interface. Also, generate thebwarsaw2001-03-261-27/+30
| | | | | | | | new style verify.txt response message, which now also contains the confirmation url. ProcessConfirmation(): Use the new Pending module interface. Watch for tuple unpack errors. Return the unpacked data when successful.
* AddMember(): Change the subscription confirmation Subject: header tobwarsaw2001-03-241-1/+1
| | | | | "... confirm <number>" instead of "... request <number>". This goes along with changes to MailCommandHandler.py.
* GetConfigInfo(): Elaborate slightly about the `host_name' attribute.bwarsaw2001-03-021-17/+17
| | | | | | | Also, comment out `web_page_url' -- it's probably just too dangerous to allow list admins to change this via the web. Making a mistake breaks the list (for the rare situation where the base url needs changing, it's up to the site admin to effect).
* GetPreferredLanguage(): Simplify.bwarsaw2001-03-011-4/+1
|
* GetConfigInfo(): Fixed typo.bwarsaw2001-03-011-1/+1
|
* Untabification.bwarsaw2001-02-281-465/+479
| | | | | | | | | | | | GetConfigInfo(): Move the setup of the language popup menu choices to outside the setting of config_info. Next round of big i18n patches. Fix some _() wrappings to use local variables. Fix the Utils.maketext() calls to pass the language in as a keyword argument.
* Create(): We don't need to touch the digest files since we're doingbwarsaw2001-02-161-11/+0
| | | | that differently now.
* Create(): os.makedirs() is better than Utils.MakeDirTree().bwarsaw2001-02-161-1/+5
|
* De-string-module-ify.bwarsaw2001-02-151-161/+144
| | | | | | | | | | | | | | | | | | | References to HandlerAPI module removed. Also, remove filter_prog attribute from the list object. GetConfigInfo(): Add lots of i18n markup for translatable strings. All the attribute descriptions and details are now marked. AddMember(), ApprovedAddMember(), DeleteMember(): Use new Message interface for sending internally crafted messages. ApprovedAddMember(): Move the lang argument to the end for better backwards compatibility. HasExplicitDest(): Use new mimelib/Message interface. HasMatchingHeader() -> hasMatchingHeader(), and simplify greatly.
* Latest round of jcrey's I18N patches. Specifically,bwarsaw2000-12-261-30/+68
| | | | | | | | | | | | | | | | InitVars(): added `language' and `preferred_language' list attributes. GetConfigInfo(): Show languages from the available languages. SetPreferredLanguage(), GetPreferredLanguage(), GetAvailableLanguages(): New methods to manipulate list language options. AddMember(), ApprovedAddMember(), ApprovedAddMembers(): Add new optional argument `lang', which gets stored as the user's preferred language. Also, mark a bunch of strings as translatable.
* First integration patch for Juan Carlos's translatable string changesbwarsaw2000-12-071-211/+227
|
* GetConfigInfo(): Update the details for both the reply_goes_to_listbwarsaw2000-11-161-17/+29
| | | | and reply_to_address configuration options.
* CheckVersion(): Do not call versions.Update, and do not set thebwarsaw2000-11-141-3/+4
| | | | data_version attribute, unless the list is locked.
* Added a Useful Comment.bwarsaw2000-11-101-1/+2
|
* GetConfigInfo(): In the reply_goes_to_list details, add a link tobwarsaw2000-10-271-1/+3
| | | | Simon Hill's dissenting opinion on Reply-To munging.
* HasExplicitDest(): It is possible that the address part of the tuplebwarsaw2000-10-061-0/+5
| | | | | | returned by getaddrlist() will return None. This happens if the header value is simply not RFC822 compliant. In that case, ignore this element.
* GetListIdentifier(): Removed as obsolete (List-Id: is not part of thebwarsaw2000-09-201-7/+0
| | | | final RFC 2369).
* GetConfigInfo(): Use Utils.maketest() to get the extra html forbwarsaw2000-09-171-2/+2
| | | | | msg_header and msg_footer. Closes SF bug #114167, Jitterbug PR #209.
* GetListIdentifier(): Don't include the description if it's emptybwarsaw2000-09-151-2/+4
| | | | (saves an extra leading space in that case).
* GetOptionsURL(): Email addresses can have strange characters in them,bwarsaw2000-09-111-1/+2
| | | | | | | which are legal re: RFC822, but aren't valid for URLs. urllib.quote() the address part of the URL. Closes SF bug #113787.
* GetConfigInfo(): Change the docstring and details for the web_page_urlbwarsaw2000-09-091-10/+15
| | | | | | | | | option. Changing web_page_url to an invalid base url will hose your list royally, requiring the site administrator to fix the url. There's no good way to sanity check the value entered, so the best we can do is have a warning explaning the situation. Closes SF bug #113739.
* __save(): Improved robustness in the face of disk-full or otherbwarsaw2000-08-051-24/+18
| | | | | | | IOErrors. E.g. the marshal module doesn't actually check for write() errors, so we dump the marshal to the string and write it in one fell swoop using the file object's write() method. Thanks to GvR for reviewing.
* GetConfigInfo(): Explain that `web_page_url' must end in a singlebwarsaw2000-08-031-1/+1
| | | | slash.
* Massive cleanup to fix relative/absolute script url calculation inbwarsaw2000-08-011-25/+6
| | | | | | | | | | | | | | response to SF Bug #110753. Specifically, GetScriptURL(): Interface change; this now takes an `absolute' flag defaulting to always use relative urls. This is now essentially just a wrapper around Utils.ScriptURL() except that it tacks on the list's name. GetOptionsURL(): Same interface change. GetAbsoluteScriptURL(), GetAbsoluteOptionsURL(): Removed. All uses changed to GetScriptURL().
* HasExplicitDest(): Integrating a patch from Gergely Madarasz frombwarsaw2000-07-271-1/+1
| | | | | 20-Jun-2000; Resent-CC: should also be considered an explicit destination.
* ApprovedAddMembers(), DeleteMember(): Refinement of twouter's patch tobwarsaw2000-07-241-8/+5
| | | | | fix the missing To: line in admin notifications of subscribes and unsubscribes.
* GetOwnerEmail(): new method to return the -owner address.bwarsaw2000-07-221-3/+11
| | | | | Lock(): If the Load() call fails with an MMUnknownListError, be sure to unlock the list before re-raising the exception.
* Create(): Fold in the CreateFiles() method. Don't use self.Lock()bwarsaw2000-07-051-13/+11
| | | | | | | | | | here because that reloads the database as a side-effect - but the config.db file doesn't exist at this point! This fixes the newlist problem. Also, there's no need to create the LOCK_DIR file; and use a safer way to create the next-digest and next-digest-topics files (which I'm not sure are strictly necessary anymore). CreateFiles(): Removed.
* Unlock(): Use unconditionally flag to avoid NotLockedErrors.bwarsaw2000-06-281-8/+5
| | | | | | | | | | | | | | | | | | | | | | Lock(): Always re-load the config.db file once the lock has been acquired. This fixes a very serious data consistency bug, explained briefly as: - Process A opens a list unlocked, loading the marshaled dictionary. Process A then tries to acquire the list lock. - Meanwhile, Process B does the same, but it actually acquires the lock first. Process B makes some changes, saves the list's marshal and relinquishes the lock. - Process A now acquires the lock. However, its database is now out-of-date because of the Process B write. It does its work and blithely rewrites the marshal, blowing away all of Process B's changes. The solution is to reload the marshal when the list lock is acquired. __init__(): Use the new Lock() semantics more efficiently.
* __load(): Simplify logic in the IOError handler.bwarsaw2000-06-231-4/+2
|
* InitTempVars(): Added back the argument withlogging when creating thebwarsaw2000-06-141-11/+8
| | | | | | | | | | | list's lock. This enables lock debugging if LIST_LOCK_DEBUGGING is true (it's false by default). InitVars(), GetConfigInfo(): Removed the `num_spawns' attribute. This has been replaced by system-wide variables in Defaults.py. HasExplicitDest(): Added Resent-To: in the list of headers we check for explicit destinations.
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-021-52/+21
| | | | | | | | | Also, __del__(), InitTempVars(): Remove all references to _log_files. Also, remove the withlogging argument to InitTempVars(). LogMsg(), CloseLogs(): Removed.
* Load(): Extend the falling back to config.db.last to situations wherebwarsaw2000-06-011-26/+48
| | | | | | | config.db exists but is corrupt (i.e. doesn't unmarshal into a dictionary). __load(): Implements all the internal db loading logic.
* Load(): If config.db is missing, fallback to config.db.last. If thisbwarsaw2000-05-301-9/+28
| | | | | | isn't found then we finally raise an exception. If config.db.last is used, shutil.copy() it back to config.db so that the logic in __save() doesn't need to change.
* InitVars(): Set the `administrivia' attribute.bwarsaw2000-05-271-0/+1
|
* InitVars(): data_version should be initialized from DATA_FILE_VERSION.bwarsaw2000-05-221-2/+3
| | | | CheckVersion(): Only Save() if the list is already locked.
* Changes to allow more control over list locking. This is used inbwarsaw2000-05-091-23/+20
| | | | | | | | | | | | | | | | | | | | | | scripts/post and other places to catch lock timeouts in a way that can be reasonably handled. Specifically, __init__(): Don't pass the lock flag to InitTempVars(). Instead, use it directly in the constructor. InitTempVars(): This doesn't get a lock argument anymore, but it still creates the lock file. Also, the withlogging argument takes its default from mm_cfg.LIST_LOCK_DEBUGGING so it's easier to turn on lock debugging globally. Load(): No longer lock the database here. Load() is essentially used internally anyway. Post(): Removed. All email generated internally is sent directly via the HandlerAPI interface. Lock(): Now has a timeout argument, which is passed to the underlying LockFile.lock() method.
* DeleteMember(): Added optional argument userack, defaulting to true,bwarsaw2000-04-211-2/+2
| | | | | which controls whether a use should get an acknowledgement message when they are unsubscribed.
* HasExplicitDest(): One more change to the semantics forbwarsaw2000-04-141-29/+42
| | | | | | | | | | | | | acceptable_aliases, based on Harald's suggestion: 1) If the regexp does not contain an '@', first try matching it against the localpart (i.e. the way things work now). 2) If 1) was skipped *or* if it didn't produce a match, try matching against entire recip address (i.e. try this even if the regexp does not contain any '@' signs). GetConfigInfo(): Document the new semantics for acceptable_aliases.
* __save(): Be even more careful during the save.bwarsaw2000-04-131-57/+75
| | | | | | | | | | HasExplicitDest(): extend the semantics of the acceptable_aliases regular expression so that if the regexp includes an `@', the regexp is match against the entire recipient address. Otherwise it's matched just against the localpart, as before. GetConfigInfo(): Document the extended semantics for acceptable_aliases.
* Create(): Raise MMListAlreadyExistsError instead of ValueError if thebwarsaw2000-04-091-12/+17
| | | | | | | | | | | | | | | | | | | | list already exists. Save(): Slightly better way to ignore ENOENT errors when unlinking a potentially non-existant config.db.tmp file. CheckValues(): cosmetic ApprovedAddMembers(): Another couple of very minor performance hacks. HasExplicitDest(): Harald undid my change of 1.146, dated 16-Dec-1999 which switched the order of the arguments to re.match. Harald is correct: the "recip" is the string to match against the "stripped" pattern. I /think/ my earlier problems were related to the use of re.match instead of re.search, so I'm changing things here to use re.search (i.e. the pattern can match anywhere inside recips, not just at the beginning). Let's see if this works, but I'm most uncomfortable about this change.
* The 'reply_to_address' configuration setting now has typehmeland2000-04-091-13/+18
| | | | | | | | | | | | | mm_cfg.Email, not mm_cfg.String. Create(): Use Utils.list_exists(). Save(): If writing to fname_tmp failed, only try unlinking fname_tmp if it in fact does exist. CheckValues(): Use urlparse module to verify that neither the scheme ("http") nor the network location ("www.python.org") of the web_page_url are empty. If either one is found to be empty, set self.web_page_url to mm_cfg.DEFAULT_URL. ApprovedAddMembers(): Some very minor performance improvements. HasExplicitDest(): Had the order of arguments to re.match() wrong.
* __init__(): Avoid the costly scan of name in Utils.list_names(). Thisbwarsaw2000-04-041-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | resulted in a huge number of useless stats (i.e. list_lists or blank listinfo could result in n**2 stats). Instead, exceptions raised in Load() are passed through the constructor, where essentially the same checks are made anyway (caught by Ted Cabeen). Load(): Several changes resulting from consistency in list-opening exceptions: - If an IOError occurs when opening the list's config.db file, transform the exception into MMUnknownListError. Also unlock the list before the exception is raised! - If the unmarshalled object is not a dictionary, raise MMCorruptListDatabaseError. Again, unlock the list first. - If unmarshalling raises an EOFError, ValueError, or TypeError, transform these into MMCorruptListDatabaseError -- after unlocking of course. IsListInitialized(): RAise MMListNotReadyError instead of MMListNotReady.
* Save(): Since Python 1.5.2 is now required, we can get rid of thebwarsaw2000-04-031-3/+3
| | | | Utils.reraise() hack.
* InitTempVars(): Use mm_cfg.LIST_LOCK_LIFETIME, which now defaults to 2bwarsaw2000-03-281-1/+1
| | | | minutes, instead of hardcoding a value in place.
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-211-1/+1
|