summaryrefslogtreecommitdiff
path: root/bin/mailmanctl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some obsolete command line scripts:Barry Warsaw2007-07-211-0/+0
| | | | | | | | | | | | | | | | | | | - bin/check_dbs because there are no more pickles - bin/convert because in MM3 everything will use $-strings and we'll do the conversion on import of the old list data - bin/mmshell because setuptools provides its own equivalent - bin/qrunner and bin/mailmanctl because the files were empty There are a bunch of scripts still left in bin/ which will eventually get removed. I'm leaving them for now because they're either helpers generally tangential to Mailman (msgfmt, po2template, pygettext, templ2pot, transcheck), or are using old interfaces that will go away soon (clone_member, convert, discard, fix_url, list_admins, remove_members, reset_pw, sync_members). Also moved bin/cleanarch into Mailman/bin/cleanarch.py and updated it to use optparse. Also added a small patch to genalias to standardize its help printing.
* Massive conversion process so that Mailman can be run from a user specifiedbwarsaw2006-07-081-545/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configuration file. While the full conversion is not yet complete, everything that seems to be required to run mailmanctl, qrunner, rmlist, and newlist have been updated. Basically, modules should no longer import mm_cfg, but instead they should import Mailman.configuration.config. The latter is an object that's guaranteed to exist, but not guaranteed to be initialized until some top-level script calls config.load(). The latter should be called with the argument to -C/--config which is a new convention the above scripts have been given. In most cases, where mm_cfg.<variable> is used config.<variable> can be used, but the exceptions are where the default value must be available before config.load() is called. Sometimes you can import Mailman.Default and get the variable from there, but other times the code has to be changed to work around this limitation. Take each on a case-by-case basis. Note that the various directories calculated from VAR_PREFIX, EXEC_PREFIX, and PREFIX are now calculated in config.py, not in Defaults.py. This way a configuration file can override the base directories and everything should work correctly. Other changes here include: - mailmanctl, qrunner, and update are switched to optparse and $-strings, and changed to the mmshell architecture - An etc directory has been added to /usr/local/mailman and a mailman.cfg.sample file is installed there. Sites should now edit an etc/mailman.cfg file to do their configurations, although the mm_cfg file is still honored. The formats of the two files are identical. - list_lists is given the -C/--config option - Some coding style fixes in bin/update, but not extensive - Get rid of nested scope hacks in qrunner.py - A start on getting EmailBase tests working (specifically test_message), although not yet complete.
* - Fixes to further remove the old Syslog from bin and cron scripts. Note thatbwarsaw2006-04-241-34/+31
| | | | | | | | | | | I didn't update cron/mailpasswds because that is going away. cron/disabled and cron/gate_news are only minimally tested. - Instead of using the RotatingFileHandler for our logs, use our own ReopenableFileHandler, which only minimally derives from FileHandler and implements a reopen() method. I think it's generally better to leave file rotation to external tools such as logrotate. - Remove some Python 2.1 compatibility stuff. - Ignore .mo files in messages/vi/LC_MESSAGES
* Set default umask for qrunners to 007.msapiro2006-02-051-4/+5
|
* back port from 2.1.6 / adding new files.tkikuchi2005-08-281-1/+9
|
* FSF office has moved. chdcking in for MAIN branch.tkikuchi2005-08-271-1/+1
|
* start_runner(): mm_cfg.PYTHON should be used in the execl() argv[0]bwarsaw2003-05-151-2/+3
| | | | | | | | | | slot, since argv[0] is used by the Python interpreter to define its library search paths. Depending on various and sundry environmental issues ($PATH, --prefix, --exec-prefix, etc.) it can still work fine, but this guarantees the right libraries will be found for the version of Python being used. Bug fix candidate.
* check_for_site_list(), main(): Complain loudly and refuse to start ifbwarsaw2003-02-041-1/+15
| | | | the site list doesn't exist.
* Because of oddities in permissions, it is possible that when you runbwarsaw2002-12-021-0/+6
| | | | | | | | | | | | mailmanctl -u, you might not be able to completely delete a list through the web. This is because the archives are written with the group of the mailmanctl script, which can be changed if that's not root, but ttw list deletion will try to delete the archive as group mailman. If the users don't match (and they usually won't), permission crash. This just includes a warning and some helpful information in the docstring.
* Jon Parise's patch to improve the usage() output for the command linebwarsaw2002-10-211-2/+6
| | | | | | and cron scripts. When code/status == 0, there's no error (it's likely --help output) so send that to stdout. Otherwise, it's an error and the output goes to stderr.
* In the LogStdErr() call, we don't need to pass in the tee argument,bwarsaw2002-10-211-1/+1
| | | | since the default is fine.
* Updated docstringbwarsaw2002-10-041-32/+31
|
* check_privs(): Typo fix, gid and uid are needed outside the if test.bwarsaw2002-08-241-4/+5
| | | | Closes SF bug #599544 by Tokio Kikuchi.
* Patch set for SF bug #596565. Use symbolic user/group names insteadbwarsaw2002-08-231-4/+7
| | | | | | | | | | | | of numeric ids. Initial idea and patch by Todd Vierling, fleshed out by Barry. Specific changes here: check_privs(): since we only have the MAILMAN_USER and MAILMAN_GROUP names here, we need to convert them to their numeric ids via getgrnam()/getpwnam(). We need the ids because setgid() and setuid() want ids.
* Stop runaway restarts by imposing a maximum restart value (currentlybwarsaw2002-08-141-4/+14
| | | | | | 10). If a qrunner exits with something other than SIGINT, its restart counter gets incremented and if that is greater than MAX_RESTARTS, that qrunner won't be restarted.
* Fixed some string markup for i18n.bwarsaw2002-08-101-3/+3
|
* acquire_lock_1(): Fix for bug # 565917 by Dale Stimson. The tempfilebwarsaw2002-07-241-2/+2
| | | | | | | needs to be prepended with the LOCK_DIR otherwise the unlink will fail. Also fixed a typo in the docstring.
* get_lock_data(): Be sure to os.path.split() the filename because allbwarsaw2002-05-061-1/+1
| | | | | | | the useful data is encoded in the last path component. Otherwise the calculation gets messed up if the lock file is something like /usr/local/mailman-2.1/locks/...
* main(): Use a more POSIX-ly correct way to extract the exit status andbwarsaw2002-04-261-11/+16
| | | | signal number from the os.wait() status value.
* main(): Write the master-qrunner.pid file with 660 permissions.bwarsaw2002-03-291-4/+9
|
* acquire_lock_1(): Unset the failing non-force lock's private `owned'bwarsaw2002-01-111-4/+3
| | | | | | | | | flag so that when it's garbage collected, the lock files won't be removed. Since they're the same as the forced lock's files, we'd be removing the files at the wrong time. acquire_lock(): Rearrange the return values so the logic is a little easier to follow. Move the "return lock" into the try stanza.
* start_runner(): Pass the -s flag to the qrunner script, which tells itbwarsaw2001-11-211-1/+1
| | | | | to run as a mailmanctl subproc (subtly, but usefully changing it's exit semantics).
* Fix typo in module docstring, reported by Ousmane Wilanebwarsaw2001-11-201-1/+1
|
* tee_to_stdout=1 in the error handler.bwarsaw2001-11-201-1/+1
|
* Rebind stderr to logs/error.bwarsaw2001-10-241-0/+3
|
* A fairly significant rewrite, but now the `restart' command actuallybwarsaw2001-10-181-94/+301
| | | | | | | | | | | | | | | | | | does the right thing! The sub-qrunners are exec'd now from bin/qrunner using some new command line options, so killing and (auto-)restarting them will cleanly reload any changed modules. Also, the lock is acquired in the foreground so you don't get ugly error messages if another master qrunner is already running. Finally, the separate lock-refresher process is gone. Too hard to implement correct lock ownership transfer semantics with it (it was more complicated than the simple pass-thru to the child). Now, lock refresh is implemented by a once-a-day alarm signal in the master qrunner process watcher. Also implemented the `reopen' command which causes all the log files to be re-opened (very useful if you're rotating log files!).
* Ben Gertzfield's patch to hardcode the path to the python executablebwarsaw2001-09-071-1/+1
| | | | | | | | | | | | | into the script's #! line -- based on --with-python settings, without losing CVS revision history. #! /usr/bin/env python becomes #! @PYTHON@ which gets substituted for in configure.
* main(): Added the -s/--stale-lock-cleanup switch so that if mailmanctl finds abwarsaw2001-08-151-12/+87
| | | | | | | | | | | | stale lock (by matching hostname and pid) it will delete the lock files before trying to reclaim them. Also added -q/--quiet to suppress status messages (but not error messages, which always go to stderr). sigterm_handler(): We need to catch SIGTERM since that's what init will send us when changing run levels. SIGTERM just kills all the sub-qrunners with SIGINT (i.e. no restart).
* main(): John Read's suggestion to include messages about whatbwarsaw2001-07-251-0/+3
| | | | mailmanctl is doing.
* main(): Print a slightly more informative error message if thebwarsaw2001-07-251-1/+5
| | | | master-qrunner lock could not be acquired.
* check_privs(): Fix the error message to be a single stringbwarsaw2001-07-251-7/+26
| | | | | | | (concatenated strings are harder for some languages to translate correctly), and use the usage() method when the check fails. main(): Add -u / --run-as-user to skip the check_privs() test.
* check_privs(): new function that drops root privileges (if we have them) andtwouters2001-07-241-0/+12
| | | | | complains if we aren't running as the right user, gets called from main(). Should we check for the availability of os.(g|s)et(u|g)id ?
* intermediatebwarsaw2001-07-051-0/+169