summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* Added some constants for use by ListAdmin.py and admindb.pybwarsaw2000-06-201-0/+8
|
* PrintPostRequest(): Fixed the call to discard a message when the givenbwarsaw2000-06-191-1/+1
| | | | message id was lost.
* Now recognizes what I think are both Netscape Messaging Service 3.6bwarsaw2000-06-161-13/+22
| | | | and 4.1 bounce formats.
* Several UI and functional changes. Better layout and better text inbwarsaw2000-06-151-20/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | places. For held subscriptions, the displayed order of `subscribe' and `refuse' is changed so that the refused button is right next to the refusal explanation. After suggestions by many people, split the headers and body into different textboxes for held messages. Before held messages often got truncated in their headers, and the bodies couldn't be seen. Instead of providing a button to view the entire message (which would be more difficult to implement through the admindb authentication blockade), it is now possible to forward the message to a given address. This defaults to the <listname>-admin address. Use this combined with the new `Defer' action to get a copy of the full message for review before deciding what to do with it. In addition to the new `Defer' action, held messages can be `preserved' for the site admin by copying the message to the $PREFIX/spam directory. This is useful for abusive messages that need closer or long term scrutiny. Message rejection notices are taken from the msgdata['rejection-notice'] value, placed their by the Hold.py module.
* HandleRequest(): Takes three new additional arguments, `preserve',bwarsaw2000-06-151-24/+60
| | | | | | | | | | | | | | | | | | | | | `forward', and `addr' which are passed in from admindb.py. These are only useful for held postings, and are only passed on to __handlepost(). preserve is a flag that says whether the held message should be copied to the `spam' directory or not. forward is a flag which says that the message should be forwarded on to an addition email address, which is contained in the addr parameter. Both most be set for forwarding to occur. Finally, HandleRequest() only deletes the database entry if the status of the sub-method is true. This is to support the new `deferred' flag for held postings. __handlepost(): Takes the three new parameters as described above. Uses shutil to do the `preserve' copy, and HandlerAPI.DeliverToUser() to do the forwarding (after inserting a `Resent-To' header).
* All MessageHeld derived classes now include a rejection string, whichbwarsaw2000-06-151-14/+31
| | | | | | | | | | | | | | | | | | is used instead of the hardcoded string in the `reject explanation' field of the admindb page. This means that the default rejection notices are more closely tailored to the type of hold put on the message. Most are simple strings, although Administrivia and MessageTooBig have more elaborate rejection_notice() methods to give some program supplied details. MessageTooBig holds also now include both the message body length and the list-specific maximum body size in the hold reason. hold_for_approval(): The rejection notice is placed in the msgdata['rejection-notice'] key for extraction by the admindb.py script.
* MessageHeld.rejection_notice(): New method which subclasses overridebwarsaw2000-06-151-0/+8
| | | | to provide a better rejection notice suggestion in the admindb page.
* SPAM_DIR: The fullpath to the $PREFIX/spam subdir.bwarsaw2000-06-151-0/+1
|
* __handlesubscription(): Change the sense of the `value' parameter tobwarsaw2000-06-141-2/+2
| | | | match the change in admindb.py (`subscribe' comes before `refuse').
* PrintAddMemberRequest(): It makes for better usability if the `refuse'bwarsaw2000-06-141-1/+1
| | | | button is just to the left of the refusal-reason text box.
* main(): call to syslog() had the wrong number of arguments.bwarsaw2000-06-141-1/+1
|
* Update(): Call ZapOldVars()bwarsaw2000-06-141-0/+7
| | | | | ZapOldVars(): Remove `num_spawns' attribute if the list object still has it.
* DATA_FILE_VERSION: Bump to 21 to catch the removal of the num_spawnsbwarsaw2000-06-141-1/+1
| | | | attribute.
* GetSender(): Return '' as the fallback false return value instead ofbwarsaw2000-06-141-1/+1
| | | | None. The type of the return value must always be a string.
* 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.
* Harald has convinced me that the lock file unlinking order should bebwarsaw2000-06-141-20/+12
| | | | | | | | | | | global-lock followed by temp-lock. This means it is once again illogical for the lock linkcount to be anything other than 0 or 2. Specifically, lock(): Remove the elif test for lincount == 1. unlock(), __break(): First remove the global lock file, followed by the temp lock file.
* Big-time reorganization of the order of variables. Added a bunch ofbwarsaw2000-06-141-115/+182
| | | | | | | | | | | | | | new comments and some navigational aids. Also added some convenience functions for better documenting values. MAX_SPAWNS, DEFAULT_NUM_SPAWNS: Removed. QRUNNER_LOCK_LIFETIME: moved here from cron/qrunner. Also cranked the lifetime up to 10 hours. LIST_LOCK_LIFETIME: cranked up to 5 hours. LIST_LOCK_TIMEOUT: shortened to 10 seconds.
* process(): For those bounce formats that are essentially MIME, it isbwarsaw2000-06-083-6/+18
| | | | | possible to get a multifile.Error not only on the mfile.next() call, but also on the mfile.read() call. Return None in both cases.
* Liberalize the regular expression matching a bit to handle other MTA'sbwarsaw2000-06-061-14/+14
| | | | | | which I suspect are Smail. They all have a very similar format that, if they aren't Smail-based, are close enough for this detector to score.
* cosmeticbwarsaw2000-06-061-1/+0
|
* do_child(): Use NNTP_USERNAME and NNTP_PASSWORD for optional site-widebwarsaw2000-06-051-1/+5
| | | | NNTP authentication values.
* NNTP_USERNAME, NNTP_PASSWORD: Optional site-wide values for specifyingbwarsaw2000-06-051-3/+8
| | | | | | authentication information to the NNTP server for posting or reading. Most sites don't need this and the defaults disable NNTP server authentication.
* ChangeOptions(): Thomas Wouters patch to not complain about emptybwarsaw2000-06-051-1/+1
| | | | lines in the mass subscribe field.
* __handlepost(): Always send out the rejection notice; don'tbwarsaw2000-06-051-3/+2
| | | | conditionalize on dont_respond_to_post_requests.
* Netscape.py: Detects what appears to be Netscape Messaging Server 3.6bwarsaw2000-06-0510-23/+107
| | | | | | | | | | | | | | bounces. These look like DSN mime messages, but don't contain -Recipient: headers. :( Caiwireless, Catchall, DSN, Exim, Postfix, Qmail, Smail, Yahoo: Changed process() API to take just the message object, since the MailList object isn't really required. Modified Catchall to use mm_cfg.DEFAULT_HOST_NAME in the one place where mlist.host_name was used. This module's deprecated anyway so it shouldn't matter much. BouncerAPI.py: Use the new bouncer.process() API. Also improve the unit testing code a bit.
* __break(): winner file may not exist.bwarsaw2000-06-051-2/+5
|
* process(): Wrap the actual message delivery loops in a mlistbwarsaw2000-06-031-12/+15
| | | | | | Save/Unlock followed by a Lock call. Because deliveries don't touch the list and can take a long time, this improves responsiveness of the system during message delivery.
* Support for delivering recipient chunks via multiple threads. Pythonbwarsaw2000-06-031-19/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | must have been built with threading support, and MAX_DELIVERY_THREADS must be > 0. It is not enabled by default because it's not clear this is a performance win. This feature should be considered experimental for now. Specifically, process(), deliver(): No longer needs the MailList object in it's argument list. This allows us to multi-thread actual message delivery. We also calculate the message's text and the admin address only once. deliver() also takes a dictionary for failures, which it updates with chunk failures. Convert logging stuff to use new syslog() interface instead of MailList.LogMsg(). Log total delivery time instead of chunk delivery time. chunkify(): Instead of a separate bucket for each TLD, we now have only 4 buckets for recipients: .com .net/.org .edu/.ca/.us everything else buckets are not backfilled. pre_deliver(), threaded_deliver(): New functions.
* MAX_DELIVERY_THREADS: new variable which controls the number ofbwarsaw2000-06-031-0/+14
| | | | | | threads used to deliver messages when recipient lists are broken into multiple chunks. Python must be built with threads support for this to work. Read the comments for details.
* Convert from mlist.LogMsg() inteface to new syslog() interface forbwarsaw2000-06-031-3/+4
| | | | logging.
* 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.
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-023-53/+49
|
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-024-25/+28
|
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-021-5/+7
|
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-021-3/+4
| | | | process(): The argument to GetSender() is `use_envelope'.
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-021-2/+3
|
* Convert all uses of sys.stderr.write() and mlist.LogMsg() to the newbwarsaw2000-06-029-24/+32
| | | | syslog() interface.
* Rename Syslog class to _Syslog to indicate that it shouldn't normallybwarsaw2000-06-021-3/+4
| | | | be instantiated.
* Makefile.in: Install all .py filesbwarsaw2000-06-022-2/+53
| | | | | | Syslog.py: New global logging class which replaces the MailList.LogMsg() interface. This module also creates a global instance which is callable and should be used for convenience.
* Fixes inspired or provided by Harald Meland. Specifically,bwarsaw2000-06-011-27/+43
| | | | | | | | | | | | | | | | | | | | | lock(): It is an expected condition that the global linkfile can have a linkcount of 1. This can arise due to a race condition between proc1 that is in the middle of unlocking, and proc2 which is trying to acquire the lock. In this case, we simply log the condition and try again later. Also, if we're already locked, we should not unlink our tmpfname. unlock(): We don't need to wrap self.locked() in a try/except. __break(): Updated the comment at the head of the method based on Harald's observation. Touching the lockfile doesn't eliminate the race condition, just makes it more unlikely. Also, we don't need to wrap the self.__read() in a try/except. Finally, elaborate the unit test suit to use /dev/random if it exists (i.e. on Linux).
* process_form(): When listing a user's other subscriptions, don't usebwarsaw2000-06-011-8/+9
| | | | | | | map_maillists() -- which has been removed anyway -- because the locking semantics interacted poorly. optionslinks() has been modified to take a listname instead of a MailList object, and it opens the list unlocked. Good ol' built-in map() is used now instead.
* map_maillists(): Removed. The semantics and interplay with listbwarsaw2000-06-011-32/+0
| | | | | | locking were just too messed up to use. And good 'ol built-in map() is fine anyway. It's only used in one place currently -- handle_opts.py -- and that is soon to be changed.
* LogStdErr(): In the call to StampedLogger(), pass manual_reprime valuebwarsaw2000-06-011-1/+1
| | | | from the function argument.
* DeliverToList(): When the parameter msgdata has no 'pipeline' key, webwarsaw2000-06-011-1/+1
| | | | | | must make a copy of LIST_PIPELINE, otherwise subsequent calls to DeliverToList() do nothing... e.g. qrunner on multiple message deliveries.
* Add a nice big security warning to the module docstring.bwarsaw2000-06-011-0/+5
|
* 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.
* Thomas Wouters writes:bwarsaw2000-05-311-1/+3
| | | | | | | | | | | There was a short discussion a month or so ago about the hyperarch 'mbox' archives having the wrong kind of date in the 'From ' lines... 'unixfrom' lines should have a very specific dateformat, namely that which 'time.ctime' returns. The following patch fixes Archiver/HyperArch.py. One minor change. To be consistent with gate_news, there are two spaces between the email address and the fromdate.
* HoldMessage(): Use the repr() of the message, not the str() so as tobwarsaw2000-05-311-1/+1
| | | | preserve the unixfrom line.
* In a bit of a kludge, added an __repr__() which returns a stringbwarsaw2000-05-311-2/+11
| | | | | | | | | | | | | | | | | composed of - the unixfrom (i.e. From_ ) line - the rfc822 headers - a blank line - the body of the message This can be used to completely reconstruct the message as received by the MTA (and as needed by Pipermail). The __str__() still returns just the rfc822 headers and the body of the message. Enqueue(): Put the repr() in the .msg file, so that it can be completely reproduced.
* Message.__str__(): Include the unixfrom line in the return value; thisbwarsaw2000-05-311-2/+1
| | | | | | should fix problems where approved held messages weren't being archived properly, and other problems. Thanks to Thomas Wouters for tracking this problem.