| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
invoked from cron.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remove the run-from-cron functionality (yes, I know this script
shouldn't be in cron/ anymore, but moving it is a PITA).
Specifically,
Removed the SIGCHLD signal handler since this will no longer be run as
a cron job. Added a PIDFILE global to name the file holding the pid
of the master qrunner process.
sighup_handler(): When the master gets a SIGHUP, send a SIGINT to all
the children so that they'll exit. This has two benefits: it will
automatically close all open log files, and the auto-restart feature
will mean all the children will see any changes to the source code
(i.e they'll restart and thus import afresh any updated modules).
master(): When the main loop exits, be sure to include the
watchdog_pid in the list of children to SIGINT.
main(): Removed the -b/--background flag. Write the pid of the
current process to data/qrunner.pid so that it can be exited
externally via: kill -INT `cat data/qrunner.pid`
Convert all syslog() calls to new style.
|
| |
|
|
|
| |
so that KeyboardInterrupts that percolate through are caught and
ignored.
|
| |
|
|
|
|
|
| |
children, so they re-open their log files too.
Move the `kids' dictionary (with keys being the pids of the children),
to module global `KIDS' so sighup_handler() can have access to it.
|
| |
|
|
|
|
|
|
|
| |
for SIGHUP to force all the log files to close and be re-opened on the
next write.
master(): Catch OSError, EINTR that can happen if a signal
(e.g. SIGHUP) is caught during the wait() system call. It's enough to
just restart the os.wait().
|
| |
|
|
| |
possible.
|
| |
|
|
| |
SIGINT inside the syslog call. It's of no consequence.
|
| |
|
|
|
| |
KeyboardError instead of outside it. This prevents the anomolous
tracebacks that sometimes occur when ^C is used to kill qrunner.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the same time. Specifically,
main(): Create a master qrunner lock file, with a lifetime of 10 days
(but see below) and exit if that lock cannot be acquired.
master(): Start the lock-refresher subprocess and restart it if it
happens to exit.
start_lock_refresher(): A tiny subprocess that owns the qrunner lock
and periodically (once a day) wakes up to refresh it.
|
| |
|
|
|
|
| |
main(), master(): Add a -n/--no-restart option which inhibits a
restart of child processes when they exit. Very helpful for
debugging.
|
| |
|
|
|
|
|
| |
change in model to a long-running process.
New usage options are added, including -r to run a specific runner
exactly once, and -b to run the process in the backround.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gets simplified considerably because the bulk of the logic is moved
into classes in the Mailman.Queue package. The next step might be to
make the queues long running processes watchdogged by the qrunner.
QRUNNERS is a list of classes to instantiate to run through the
various queue directories. Currently there are only incoming,
outgoing, and usenet queues. Each qrunner is run in it's own child
process (via fork), so we need to be more careful about race
conditions in the re-queuing logic.
main(): Pretty simple now, it just forks and waits on the child
processes.
|
| |
|
|
|
| |
-owner address, explicit set the 'noack' flag to false so the Replybot
module will act on it. Closes bug #114603.
|
| | |
|
| | |
|
| |
|
|
|
| |
Pass in the `filebase' value to the Message constructor to make sure
the message uses the same hash value as before.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
breaking out of the main loop when either are exceeded.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
marked as volatile and not saved to the .db file.
Use Utils.reap().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
setting up stderr logging.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
dictionary; this contains pids which aren't descendent to the qrunner
process.
|
| |
|
|
|
| |
message can be dequeued or not. On failure, DeliverToList() will
automatically enqueue the message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
|
|
because of total or partial failure in the smtpd handoff.
|