summaryrefslogtreecommitdiff
path: root/cron
Commit message (Collapse)AuthorAgeFilesLines
...
* main(): GetAbsoluteScriptURL() => GetScriptURL(..., absolute=1)bwarsaw2000-08-011-1/+1
|
* main(): Fixed typo in syslog() call.bwarsaw2000-07-271-1/+1
|
* main(): Unmarshal the .db file before creating the Message object.bwarsaw2000-07-261-4/+5
| | | | | Pass in the `filebase' value to the Message constructor to make sure the message uses the same hash value as before.
* dispose_message(): A refinement of the message disposition scheme.bwarsaw2000-07-221-8/+74
| | | | | | | | | | | | | | | | | For messages that have toadmin set (i.e. came to the -admin address), we only do bounce detection before sending off to the list owners. Specifically, we don't do bounce-loop detection. All messages sent to the owners will get Errors-To: set to the -owner address. It is the -owner address that does bounce-loop detection before sending off to the list owners. The reason this is done is so that bounces arriving at the -admin address but not matching any detectors will be forwarded on the list owners. But bogus list owner address must be dealt with as well, so these are handled by the -owner address. This is all documented at the top of the file.
* process_lists(): Rewritten for efficiency. The list object is neverbwarsaw2000-06-281-30/+35
| | | | locked until absolutely necessary.
* Get rid of the os.fork() for gating each newsgroup. All gating nowbwarsaw2000-06-271-78/+49
| | | | | | | | | | | | happens in the parent process. poll_newsgroup(): Take a `lock' argument to keep the gate_news lock fresh while gating the newsgroup. Some changes to the log messages. gate_news(): Removed -- folded into process_lists(). process_lists(): Take a `lock' argument to pass to poll_newsgroup(). Perform all work in the parent process. Better logging.
* main(): Honor QRUNNER_PROCESS_LIFETIME and QRUNNER_MAX_MESSAGES bybwarsaw2000-06-261-0/+11
| | | | breaking out of the main loop when either are exceeded.
* dispose_message(): If the sender of the message comes frombwarsaw2000-06-231-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
* Use syslog() interface instead of writing to stderr. All syslogbwarsaw2000-06-231-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.
* Use syslog() interface instead of writing to stderr. All syslogbwarsaw2000-06-231-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.
* main(): Don't need to treat `kids' key specially here, since it's nowbwarsaw2000-06-201-19/+9
| | | | | | marked as volatile and not saved to the .db file. Use Utils.reap().
* Get rid of the -s/--stderrs and --quiet/-q options. Use syslog() forbwarsaw2000-06-201-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.
* This script now does most of the work that post, mailcmd, andbwarsaw2000-06-141-14/+50
| | | | | | | | | | | | | | | | | | | | | | | mailowner used to do. Those scripts now just quickly queue the messages into qfiles/. This was the only way to make sure that we never hit MTAs delivery command time limits. QRUNNER_LOCK_LIFETIME: moved to Defaults.py dispose_message(): Knows how to dispose of messages queued by post, mailcmd, or mailowner. mailcmd sets the `torequest' msgdata key, and mailowner sets the `toadmin' msgdata key. For torequest messages, we send the message through ParseMailCommands and always return 0. For toadmin messages, we send the message through the bounce scanner, and if that fails to find a bounce, we send the message on to the list owner (with all the proper queuing on errors). For all other messages, we do nothing different. main(): Be a little more careful about closing the file descriptors.
* open_newsgroup(): Use NNTP_USERNAME and NNTP_PASSWORD for optionalbwarsaw2000-06-051-1/+3
| | | | site-wide NNTP authentication values.
* poll_newsgroup(): MailList objects don't have a Post() methodbwarsaw2000-06-031-3/+4
| | | | anymore. Use HandlerAPI.DeliverToList().
* Crank QRUNNER_LOCK_LIFETIME to 30 minutes and set manual_reprime=0 inbwarsaw2000-06-011-2/+2
| | | | setting up stderr logging.
* updated some commentsbwarsaw2000-05-311-8/+2
|
* poll_newsgroup(): Use time.ctime() as a more succinct way of craftingbwarsaw2000-05-311-1/+1
| | | | the unixfrom line.
* Run qrunner every minute; making the system much more responsive,bwarsaw2000-05-311-7/+7
| | | | | | | | especially in light of the recent change that queues approved messages rather than delivering them directly. Also, use "python -S" to improve startup time; this avoid the costly and unnecessary "import site".
* main(): If a message in the queue is destined for a list that doesn'tbwarsaw2000-05-301-6/+16
| | | | | | | | exist, log this error and dequeue the message. Otherwise, messages for removed lists will sit in the queue forever because they can no longer be delivered. dequeue(): Factor out dequeuing logic.
* main(): Zap the `kids' key if it's present in the reconstitutedbwarsaw2000-05-221-0/+7
| | | | | dictionary; this contains pids which aren't descendent to the qrunner process.
* main(): Only check return value of dispose_message() to see if thebwarsaw2000-05-221-2/+0
| | | | | message can be dequeued or not. On failure, DeliverToList() will automatically enqueue the message.
* pending_requests(): Backwards compatibility code to handle the tuplebwarsaw2000-05-081-1/+6
| | | | | representing the record for held messages. In pre-2.0b3 it was a 5-tuple, but it is now a 6-tuple.
* Run qrunner every 10 minutes on the two's.bwarsaw2000-05-081-2/+2
|
* Substantial changes for robustification of deliveries.bwarsaw2000-05-081-31/+80
| | | | | | | | | | | | | | | | | dispose_message(): Compatibility function for delivery of pre-2.0beta3 version qfiles and 2.0b3 version qfiles (whose marshaled state now contains a schema version number). open_list(): Since qrunner can attempt delivery against the same list multiple times, cache the list name and the MailList object in a global, and reuse it if possible. The only thing that has to be managed explicitly is acquiring and relinquishing the lock. That fine though 'cause that's what we actually want to do! main(): Integrate with the new delivery stuff; use the msgdata dictionary for message metadata. Also, dig out the 'kids' info, which is a list of subproc pids to wait on. Re-queue the message if delivery did not successfully complete.
* main(): Patch after a Thomas Wouters suggestion which relaxes the filebwarsaw2000-04-271-3/+3
| | | | | name match for gzip candidates, so weeklies, quarterlies, etc. will get compressed.
* pending_requests(): missing parens made the RHS of the % not a tuple.bwarsaw2000-04-121-1/+1
| | | | Odd this has never been caught before!
* Significant reworking based on the comments of Harald Meland and Jimbwarsaw2000-04-071-207/+165
| | | | | | | | | | | | | | | | | | Tittsler. In summary, each list maintains its own watermark as a config.db attribute, and the separate gate_watermarks is no longer used. This greatly simplifies the logic in this script. Some specifics, main(): The command line options have changed, and no longer supports invocation as "gate_news listname first last". Added --stderrs/-s, --quiet/-q, and --help/-h flags. Removed unnecessary imports. WATERMARK_FILE, LIST_LOCK_FILE both are gone. There's a global block file and each list locks itself when actually doing the gating of articles.
* main(): Catch base class MMListError.bwarsaw2000-04-041-1/+1
|
* Cron script for re-trying delivery of messages previously queuedbwarsaw2000-03-281-0/+106
| | | | because of total or partial failure in the smtpd handoff.
* cosmeticbwarsaw2000-03-281-1/+1
|
* Every 1/2 hour, run qrunner to retry failed deliveries.bwarsaw2000-03-281-0/+3
|
* SCRIPTS: Added qrunner script to list of installable scriptsbwarsaw2000-03-281-1/+1
|
* Ron Jarrell points out that this still tried to install run_queue.bwarsaw2000-03-221-2/+2
|
* Since the bulk mailer is gone now, run_queue is no longer necessary.bwarsaw2000-03-211-46/+0
|
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-216-6/+6
|
* Remove the entry for run_queue.bwarsaw2000-03-211-3/+0
|
* main(): Don't complain about a bogus archive_directory ifbwarsaw2000-03-131-1/+4
| | | | | last_post_time is <= 0 (meaning there have been no messages posted to the mailing list yet). Idea by Jim Tittsler.
* Import nntplib from Mailman.pythonlib package to pick up the 1.5.2+bwarsaw2000-03-131-17/+11
| | | | | | version of this module. main(): simplified connection creation, set readermode in constructor.
* poll_newsgroup(): If a To: header is found in the original message, itbwarsaw2000-02-091-2/+3
| | | | | is moved to X-Originally-To:. In all cases, To: is set to the list's email address. This resolves PR#172.
* main(): Watch out for error 500 when using the group command on thebwarsaw2000-02-071-1/+10
| | | | | | | | NNTP connection. If the Mailman gateway is on the same machine as the news server, you probably need to set the news server to reader mode first. Patch given by Thomas Wouters inspired by a patch from Jim Tittsler.
* poll_newsgroup(): slightly better debuggingbwarsaw1999-12-251-2/+2
|
* Added "tee_to_stdout=0" argument to the LogStdErr() call, to avoidhmeland1999-12-161-1/+1
| | | | cron mailing me the output sent to stdout on every run.
* When sending a list's digest, the list must be locked, and must bebwarsaw1999-12-151-10/+20
| | | | | saved after sending, otherwise the digest numbers and post numbers are not tracked correctly.
* convert to the new message delivery mechanismbwarsaw1999-12-141-7/+11
|
* Close the NNTP connection in a better way.bwarsaw1999-12-131-7/+5
|
* Be sure to close the NNTP connection so we don't leak file descriptorsbwarsaw1999-12-131-13/+6
|
* Don't include process ids in messages since these are now implicitlybwarsaw1999-12-131-11/+9
| | | | added by StampedLogger.
* Pre-load the cgi module from our special one, similar to what happensbwarsaw1999-12-111-0/+12
| | | | | in scripts/driver. Maybe this will fix the problem with the weird Archiver import errors??
* Increase the logging, because something weird is going on!bwarsaw1999-12-111-5/+18
| | | | | Also, catch socket.error's that can occur during the nntplib.NNTP() call.