summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib (unfollow)
Commit message (Collapse)AuthorFilesLines
2000-06-23do_output(): Skip volatile attributes (i.e. those whose name beginsbwarsaw1-0/+3
with an underscore).
2000-06-23ParseMailCommands(): Use mm_cfg.LIKELY_BOUNCE_SENDERS instead ofbwarsaw1-3/+1
hard-coded list (see change in qrunner).
2000-06-23dispose_message(): If the sender of the message comes frombwarsaw1-1/+14
LIKELY_BOUNCE_SENDERS, then this message is probably bounced from a bogus admin address. Catch and stop the loop by not attempting delivery again. Fixes PR#285, BUG#106592
2000-06-23LIKELY_BOUNCE_SENDERS:bwarsaw1-0/+8
# List of addresses (lhs of the @) that likely come only from MTAs # bouncing messages. This is used in qrunner and # MailCommandHandler.py to stop processing or forwarding such # messages.
2000-06-23main(): syslog doesn't need a trailing newlinebwarsaw1-1/+1
2000-06-23Administrivia.__doc__: Fixed typo (closes SF bug# 108128).bwarsaw1-1/+1
2000-06-23GetConfigInfo(): Reword slightly the two toggles to be morebwarsaw1-4/+12
understandable. Also, added the volatile _mass_catchup attribute for explicitly catching up a linked newsgroup.
2000-06-23Hackish support for `volatile' properties in the web interface.bwarsaw1-9/+16
I.e. these are selections that can be presented in an admin page, but don't directly affect the value of a saved list attribute. This is used for a "Mass Catchup" button in the gateway category. Volatile property convention is that the name starts with an underscore. Specifically, GetItemGuiValue(): For Radios and Toggles, only do a getattr() of varname if the name does not start with an underscore. Otherwise default the checked value to 0. This is bogus because it would be better to take the default value from the property description, but that's too much of an API change for now. ChangeOptions(): If the property name starts with an underscore, do something different. This has to check for specific volatile parameters, of which the only one currently is `_mass_catchup'. If that's the property and the value is true, then set usenet_watermark to None, which is the signal to gate_news to do a mass catchup (i.e. set the watermark to the last article currently on the server). Note that the GatewayManager category used to always do a mass catchup when gateway_to_mail was toggled. This isn't always the right thing, so this change allows the admin to explicitly do a catch up.
2000-06-23__load(): Simplify logic in the IOError handler.bwarsaw1-4/+2
2000-06-23reap(): Added optional argument `func' which, if supplied, is abwarsaw1-1/+3
function to call with no arguments, every time through the while loop. This lets callers, e.g. keep a lock fresh while waiting for all the children to finish.
2000-06-23ArchiveMail(): First, extended the signature to take a msgdatabwarsaw1-20/+25
dictionary, which gets filled in with the child pid. This allows it to be reaped by functions higher up in the call chain. Second, and more importantly, be quite paranoid about the fork and child processes. Make absolutely sure that the child process exits. Wrap all the child code in try blocks so that no matter what, the lock will get released (by calling unlock() with the unconditionally flag set). If no exception occurs, the child will exit with status 0, otherwise the traceback will be printed to stderr, a message indicating which list has a corrupt archive is logged to logs/error, and the child process will exit with status 1. Extend the archive.lock to 1 hour.
2000-06-23DumbBTree.__init__(): Rewrote the file opening and unmarshaling codebwarsaw1-5/+15
to be more robust so that if either fail, we end up with an empty self.dict and self.sorted. Note that the archiver subprocess will still fail with an exception. Fixing this will require much more work on the archiver as a whole, and isn't worth it right now. But this fix averts the problem when regenerating the archive from scratch using bin/arch, so at least corrupt archives can be rebuilt.
2000-06-23do_pipeline(): Added a failsafe around the delivery module's process()bwarsaw1-1/+5
call. If the module does a fork, and the child process returns here, we exit immediately.
2000-06-23process(), hold_for_approval(): The clue that the message has comebwarsaw1-2/+2
from the gate_news cronjob is that the msgdata dictionary will contain a `fromusenet' key. This was erroneously checking the msg object for the `fromusenet' attribute (as was the case with the old interface), which caused notifications to go to Usenet posters whose messages were held. Bogus!
2000-06-23process(): ArchiveMail() now takes a second argument, msgdata, whichbwarsaw1-1/+1
will get filled with the pids of any children that get forked.
2000-06-23process(): Be extra paranoid about the forks and child processes.bwarsaw1-7/+11
Make absolutely sure that the child process exits without returning control to the caller. If we complete successfully, we exit with status 0. If any exception occurs we print a traceback and exit with status 1.
2000-06-23Use syslog() interface instead of writing to stderr. All syslogbwarsaw1-24/+39
errors go to the logs/gate_news file, while any exceptions that percolate to the top would go to logs/error. poll_newsgroup(): Always update the watermark, even if the message has been seen before (i.e. we found an X-BeenThere: header) or if an nntp.error_temp occurred (which can happen if the message has expired). Any other exceptions will not be caught and thus will not update the watermark. process_lists(): Be extra paranoid about the forks and child processes. First of all, the fork could fail and if so, we stop cruising through the mailing lists and return to the parent the dictionary of child pids gathered so far. Second, make absolutely sure that the child process exits without returning control to the caller. If we complete successfully or if a TimeOutError occurred, we exit with status 0, otherwise we print a traceback and exit with status 1. main(): First off, we added a keepalive function to geep the gate_news lock fresh while we're waiting for our child processes to exit. Second, we added a failsafe around process_list() -- which does a fork -- so that in the unlikely situation where the child process could have gotten returned here, we exit immediately.
2000-06-23Use syslog() interface instead of writing to stderr. All syslogbwarsaw1-10/+13
errors go to the logs/qrunner file, while any exceptions that percolate to the top would go to logs/error. main(): Refresh the qrunner lock each time through the main loop.
2000-06-20If $CVSROOT isn't set, guess it from CVS/Root, otherwise abort.bwarsaw1-4/+14
2000-06-20PrintAddMemberRequest(): First value should be mm_cfg.SUBSCRIBE.bwarsaw1-1/+1
2000-06-20bumpingbwarsaw1-2/+3
2000-06-20Added important note about reloading crontab.inbwarsaw1-0/+10
2000-06-20Added Ron Jarrellbwarsaw1-0/+1
2000-06-20Added lots of news about changes in 2.0beta3.bwarsaw1-1/+64
2000-06-20checkout(), make_pkg(): Some re-org and fixing for new SourceForgebwarsaw1-10/+14
development platform.
2000-06-20do_pipeline(): Factored out from DeliverToList().bwarsaw1-5/+12
DeliverToList(): Handle `_enqueue_immediate' by bypassing the call to do_pipeline and enquing the message immediately to disk. Still maintains the same interface to the outside world. Also, copy the pipeline list regardless of whether it comes from LIST_PIPELINE or from msgdata.
2000-06-20main(): Don't need to treat `kids' key specially here, since it's nowbwarsaw1-19/+9
marked as volatile and not saved to the .db file. Use Utils.reap().
2000-06-20process(): Use the volatile `_kids' key to store the child pids.bwarsaw1-2/+2
2000-06-20PrintPostRequest(), PrintAddMemberRequest(): Use the new valuesbwarsaw1-2/+5
parameter to RadioButtonArray() constructor, and use the new symbolic constants instead of the hardcoded values.
2000-06-20process(): Relax the search constraints even more. I've now seen twobwarsaw1-4/+7
slightly different bounce reports froma NMS 3.6 servers. We now search just for multipart/* parts, and look only for message/* sub-parts.
2000-06-20RadioButtonArray.__init__(): New optional argument `values' which canbwarsaw1-8/+13
be a sequence of values to assign to the buttons. Must be the same length as the `button_names' sequence. If not given, the values are the ordinal position of the button. RadioButtonArray.Format(): A more efficient way of generating the HTML text.
2000-06-20reap(): Wait on a dictionary of child pids. Moved here from gate_newsbwarsaw1-0/+13
so other scripts can use it.
2000-06-20Use the constants defined in Defaults.py.inbwarsaw1-21/+24
HandleRequest(): Default comment, preserve, forward, addr arguments to None. Instead of raising LostHeldMessage() here, return LOST constant so the pending database can maintain consistency. Also, enqueue the message immediately instead of trying to delivery it here. This improves performance by pushing delivery off to qrunner, and it also helps to maintain pending database consistency.
2000-06-20Enqueue(): New convention; msgdata keys that start with leadingbwarsaw1-0/+5
underscore are volatile and don't get saved to disk.
2000-06-20Added some constants for use by ListAdmin.py and admindb.pybwarsaw1-0/+8
2000-06-20Get rid of the -s/--stderrs and --quiet/-q options. Use syslog() forbwarsaw1-123/+80
all logging activities except stderr output from child tracebacks. Get rid of unused imports. poll_newsgroup(): Reorganized so as not to use the crufty QuickEscape. Also, be sure to update mlist.usenet_watermark even if we see a message that's already been through the list. When delivering the message to the list, enqueue it immediately (by adding the _enqueue_immediate flag to msgdata) instead of trying to deliver it. This lets qrunner deliver the message as appropriate. reap(): Move to Utils.py process_lists(): Don't try to be fancy about catching exceptions in the child. Just let them percolate up and Python will do the right thing by logging it and exiting with a non-zero status. main(): Use standard LockFile module for acquiring the gate_news lock.
2000-06-19Better option parsingbwarsaw1-60/+92
Added -w/--owner which scans the owner addresses too Multiple regexps are legal now
2000-06-19PrintPostRequest(): Fixed the call to discard a message when the givenbwarsaw1-1/+1
message id was lost.
2000-06-16Bumping to 2.0beta3bwarsaw2-31/+23
2000-06-16A couple of updatesbwarsaw1-16/+9
2000-06-16Linux => GNU/Linuxbwarsaw3-3/+3
2000-06-16Linux => GNU/Linuxbwarsaw1-4/+4
This file should be renamed.
2000-06-16Now recognizes what I think are both Netscape Messaging Service 3.6bwarsaw1-13/+22
and 4.1 bounce formats.
2000-06-15put bulk of logic in main() function and re-arrange things so thebwarsaw1-17/+19
initial fresh installation still writes the data/last_mailman_version file.
2000-06-15Several UI and functional changes. Better layout and better text inbwarsaw1-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.
2000-06-15HandleRequest(): Takes three new additional arguments, `preserve',bwarsaw1-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).
2000-06-15Added a better explanation of what the administrator can do whenbwarsaw1-5/+19
clearing the pending actions. This includes the new admindb options described in the checkin message of admindb.py
2000-06-15All MessageHeld derived classes now include a rejection string, whichbwarsaw1-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.
2000-06-15MessageHeld.rejection_notice(): New method which subclasses overridebwarsaw1-0/+8
to provide a better rejection notice suggestion in the admindb page.
2000-06-15SPAM_DIR: The fullpath to the $PREFIX/spam subdir.bwarsaw1-0/+1