summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* New qrunner one-shot script which subsumes the rest of the oldbwarsaw2001-07-050-0/+0
| | | | | | | | 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.
* intermediatebwarsaw2001-07-051-0/+96
|
* New qrunner start script which is appropriate as a Unix init scriptbwarsaw2001-07-050-0/+0
| | | | | | | | (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.
* intermediatebwarsaw2001-07-051-0/+169
|
* New module which contained the guts of the old cron/qrunner script.bwarsaw2001-07-050-0/+0
| | | | | Both bin/mailmanctl and bin/qrunner import this module to perform their primary logic.
* intermediatebwarsaw2001-07-051-0/+205
|
* PIDFILE: new variable pointing to $prefix/data/qrunner.pidbwarsaw2001-07-051-0/+1
|
* Lots of changes to make this act more like a traditional daemon and tobwarsaw2001-07-031-67/+59
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't run qrunner as a cron job any more (it's now a daemon).bwarsaw2001-07-031-3/+0
|
* main(), show_results(): Removed unnecessary global declarations.bwarsaw2001-07-031-5/+1
| | | | | | | | | 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.
* move_language_templates(): if the TEMPLATE_DIR/gtemplate couldn't bebwarsaw2001-07-031-1/+6
| | | | | opened, then assume it's a new template added with this upgrade, and don't attempt to search for more specific, but identical templates.
* ConfirmUserPassword(): Obsolete; removed.bwarsaw2001-07-031-27/+49
| | | | | | | | | | | | | 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.
* checkcgi(): Calculate the directory for the cgi-bin scripts, sincebwarsaw2001-07-021-2/+3
| | | | CGI_DIR is no longer defined.
* mail_passwords(): Fixed missing translation markings; found by Ousmanebwarsaw2001-07-021-1/+1
| | | | Wilane.
* Integrating Juan Carlos Rey Anaya's latest update to the Spanish catalog.bwarsaw2001-06-291-5381/+3259
|
* DEAL_WITH_PERMFAILURES_EVERY: controls how often _doperiodic() willbwarsaw2001-06-281-1/+12
| | | | | | | | | | | | | 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.
* Several changes which allow subclasses to do some calculation for eachbwarsaw2001-06-281-3/+48
| | | | | | | | | | | | | | | | | | | | | 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.
* UserNotification.__init__(): change the signature so that the textbwarsaw2001-06-281-2/+3
| | | | | argument defaults to None. Only set the payload when the text argument is not None.
* Syncing with latest Python cvs version (#, flags should be printedbwarsaw2001-06-281-1/+4
| | | | just before the msgid lines).
* main(): Be sure to set the _plaintext message metadata key to informbwarsaw2001-06-279-9/+17
| | | | | the Switchboard that it should save the message as plain text and not as a pickle.
* Performance enhancement. In order to save on the time it takes tobwarsaw2001-06-271-18/+35
| | | | | | | | | | | | | | | | | | | | | 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.
* Added Ousmane Wilanebwarsaw2001-06-272-3/+3
|
* Add Ousmane Wilanebwarsaw2001-06-271-0/+1
|
* GetStandardReplacements(): When displaying the selected language,bwarsaw2001-06-271-2/+5
| | | | | first try to get the index of the explicit argument, falling back to the list's preferred language, and the server's default.
* main(): Fixed the handling of the user's preferred language. Now itbwarsaw2001-06-271-10/+10
| | | | | | | | | 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.
* main(): Fix this to use the new authentication machinery.bwarsaw2001-06-271-5/+13
|
* Latest generation of mailman.pot, and integration of Spanish catalogbwarsaw2001-06-274-654/+643
| | | | updates from Juan Carlos Rey Anaya.
* Spanish template updates from Juan Carlos Rey Anaya.bwarsaw2001-06-273-124/+271
|
* process(): Add support for configurable log files. Four new variablesbwarsaw2001-06-271-14/+34
| | | | | | | | | | | | 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.
* Add support for configurable log files, at least for the SMTPDirectbwarsaw2001-06-271-6/+73
| | | | | | | | | | | | | | 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.
* run_main(): Don't stick Mailman.i18n._ in the builtins.bwarsaw2001-06-271-11/+2
|
* Better syslog() calling conventions.bwarsaw2001-06-271-6/+2
| | | | | | | _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.
* Remove an unused import.bwarsaw2001-06-271-1/+0
|
* Better syslog() calling conventions.bwarsaw2001-06-2710-22/+22
|
* Better syslog() calling conventions. Also, don't mark syslog messagesbwarsaw2001-06-2710-14/+12
| | | | as translatable.
* Better syslog() calling conventions. Also, log some messages tobwarsaw2001-06-271-4/+4
| | | | `mischief' instead of `error'.
* Use better syslog() calling convention.bwarsaw2001-06-271-4/+4
|
* Use better syslog() calling convention.bwarsaw2001-06-271-4/+3
|
* Use better syslog() calling convention.bwarsaw2001-06-274-54/+51
|
* MsgSafeDict(): New class which is used in SMTPDirect and allows forbwarsaw2001-06-271-0/+27
| | | | | syslog format strings to include information from the message headers.
* Use better syslog() calling convention.bwarsaw2001-06-271-9/+8
| | | | Also, syslog messages should not be marked as translatable.
* write(): Compare to None with `is' not `=='.bwarsaw2001-06-271-3/+6
|
* LogMsg(): Extended function signature to make argument passing bothbwarsaw2001-06-271-3/+12
| | | | | | 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.
* Updates from the FAQ and TODO files.bwarsaw2001-06-256-57/+53
| | | | Also, add Tollef Fog Heen to list of acknowledgements.
* Added Tollef Fog Heenbwarsaw2001-06-251-0/+1
|
* print_results(): Toggle off the output of <head><body> tags by settingbwarsaw2001-06-251-0/+5
| | | | | | 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.
* Set the default background color to "white".bwarsaw2001-06-251-2/+2
|
* options_page(): Toggle off the output of <head><body> tags by settingbwarsaw2001-06-251-0/+5
| | | | | | 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.
* Classes Document and HeadlessDocument are almost identical, exceptbwarsaw2001-06-251-30/+29
| | | | | | | | | | | | | | | | | 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.
* Add a little bit of useful commentary when checking for the mail andbwarsaw2001-06-252-8/+8
| | | | cgi wrapper GIDs.