| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
cron/qrunner functionality that wasn't appropriate for
bin/mailmanctl. This allows you to run a sub-qrunner once through
its processing loop, but only if the master qrunner isn't running.
This completes the replacement of cron/qrunner which is now obsolete.
|
| | |
|
| |
|
|
|
|
|
|
| |
(it's also fine to call it from the command line). Lightly modeled
after Apache's apachectl program.
This replaces cron/qrunner which is now obsolete. Cron should never
start qrunner now, even to do the heartbeat.
|
| | |
|
| |
|
|
|
| |
Both bin/mailmanctl and bin/qrunner import this module to perform
their primary logic.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
main(): If the WebAuthenticate() fails, search for the form key
`adminpw' -- not `admlogin' -- to decide whether to include the error
message or not. The former is the cgi key for the password field,
while the latter is the key for the submit button, which isn't
included in a Mozilla posted form if the Enter key is hit instead of
clicking on the button.
|
| |
|
|
|
| |
opened, then assume it's a new template added with this upgrade, and
don't attempt to search for more specific, but identical templates.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
AuthContextInfo(): Allow `user' argument to be optional; default to
None.
Authenticate(): Re-install backwards compatibility for pre-MM2.1 list
passwords. For AuthListAdmin context only, if the sha check fails,
fallback to crypt (if the crypt module could be imported) and md5
checks. If either of the latter two matches, assume that the list
password is "old style" and auto-upgrade it to the sha password, based
on the matching plain text response. This way, MM2.0.x list passwords
won't just be broken upon an upgrade.
|
| |
|
|
| |
CGI_DIR is no longer defined.
|
| |
|
|
| |
Wilane.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
try to deal with deferred permanent failures.
_doperiodic(): It can be a bit expensive to actually deal with
permanent failures every time through this loop, and we don't need
that level of accuracy. So now we keep a counter and only process
permanent failures every DEAL_WITH_PERMFAILURES_EVERY times. (Okay,
so this variable defaults to 1, but you get the idea. :)
Also, move the Save() inside the try clause. I've decided that
finally clauses should only unlock the list, not try to save it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file processed. This would allow for example, a throttling algorithm
which limited the number of files processed per time period, or when
load averages were too high. Specifically,
run(): Allow __oneloop() to return any false value, not just zero, to
trigger the snooze alarm.
__oneloop(): After each file is processed, call _shortcircuit() and
break out of the file loop if that returns a true value. This way,
_shortcircuit() is executed for each file processed, and gives
subclasses a chance to do some per-file calculation. _doperiodic()
is at a finer granularity, since it conflates per-file and
per-processing-loop calculations.
_cleanup(), _dispose(), _doperiodic(), _snooze(), _shortcircuit(): Add
docstrings describing their interface.
_shortcircuit(): Default is to return 0, meaning don't shortcircuit.
|
| |
|
|
|
| |
argument defaults to None. Only set the payload when the text
argument is not None.
|
| |
|
|
| |
just before the msgid lines).
|
| |
|
|
|
| |
the Switchboard that it should save the message as plain text and not
as a pickle.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parse and generate the plain text message each time it's enqueued or
dequeued, we now use a binary cpickle as the message representation
file. This is controlled by a module global SAVE_MSGS_AS_PICKLES
which defaults to 1. When a message is saved as a pickle, its
extension will be .pck instead of .msg. dequeuing will automatically
recognize the different message formats and load accordingly.
Specific changes include:
enqueue(): If SAVE_MSGS_AS_PICKLES is set and the message metadata
does not have a "_plaintext" key, then the message object is stored as
a binary cpickle dump for speed. The incoming scripts post, join,
leave, etc. will set the _plaintext key because they funnel the text
straight from stdin to the .msg file, and the message text is only
parsed on the first dequeue from qfiles/in.
dequeue(): First try to load and unpickle the .pck file, falling back
to loading and parsing the .msg text file if the former is missing.
|
| | |
|
| | |
|
| |
|
|
|
| |
first try to get the index of the explicit argument, falling back to
the list's preferred language, and the server's default.
|
| |
|
|
|
|
|
|
|
| |
is retrieved out of the cgidata early on, so as to catch any new
language setting the user is making. Falls back to using the last
stored user preference.
Also, fixed indentation bug which prevented user's language setting to
take effect unless they had set some other option as well.
|
| | |
|
| |
|
|
| |
updates from Juan Carlos Rey Anaya.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
have been added:
SMTP_LOG_EVERY_MESSAGE
SMTP_LOG_SUCCESS
SMTP_LOG_REFUSED
SMTP_LOG_EACH_FAILURE
The usage and format of these variables are described in
Defaults.py.in.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
module. Four new variables have been added:
SMTP_LOG_EVERY_MESSAGE
SMTP_LOG_SUCCESS
SMTP_LOG_REFUSED
SMTP_LOG_EACH_FAILURE
The usage and format of these variables are described in detail in the
preceding comment block.
Also, HTML_DIR and CGI_DIR are removed since they are unused.
|
| | |
|
| |
|
|
|
|
|
| |
_dispose(): Remove the "except Exception" class which allows any
exceptions to percolate up to Runner.__oneloop()'s catch-all exception
handler. Runner properly implements the log-and-shunt procedure for
any such exceptions.
|
| | |
|
| | |
|
| |
|
|
| |
as translatable.
|
| |
|
|
| |
`mischief' instead of `error'.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
syslog format strings to include information from the message
headers.
|
| |
|
|
| |
Also, syslog messages should not be marked as translatable.
|
| | |
|
| |
|
|
|
|
| |
nicer and more robust. String interpolation is now done here instead
of at callee site, so exceptions like TypeError and ValueError can be
caught and dealt with better.
|
| |
|
|
| |
Also, add Tollef Fog Heen to list of acknowledgements.
|
| | |
|
| |
|
|
|
|
| |
doc.suppress_head to 1. This is because the output generated from
this function comes largely from the subscribe.html template, which
includes those tags.
|
| | |
|
| |
|
|
|
|
| |
doc.suppress_head to 1. This is because the output generated from
this function comes largely from the options.html template, which
includes those tags.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that the former adds <head><body> tags, while the latter suppresses
them. Document should be used for pages that are created by the
scripts out of whole cloth, while HeadlessDocument should be used for
any template-based page (which must supply its own head & body tags,
although not all of them do, I think).
It turns out to be useful to transform a Document into a
HeadlessDocument, so the trigger to output the head & body tags is the
instance variable "suppress_head" which Document defaults to 0 and
HeadlessDocument defaults to 1. All the real work is performed in
Document.Format().
Document.get_content_type(): Add the extra newline here, for
convenience.
|
| |
|
|
| |
cgi wrapper GIDs.
|