diff options
| author | bwarsaw | 2002-05-22 02:39:42 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-05-22 02:39:42 +0000 |
| commit | 91759d44e44b9438db9bd77d78cb50dbceac0146 (patch) | |
| tree | db95f187640733bbacf3655842b22cdac42a2a46 /cron | |
| parent | 2e31a00d1b618b76597253f6d0aca83987040326 (diff) | |
| download | mailman-91759d44e44b9438db9bd77d78cb50dbceac0146.tar.gz mailman-91759d44e44b9438db9bd77d78cb50dbceac0146.tar.zst mailman-91759d44e44b9438db9bd77d78cb50dbceac0146.zip | |
Diffstat (limited to 'cron')
| -rwxr-xr-x | cron/mailpasswds | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cron/mailpasswds b/cron/mailpasswds index fcb3d8cf6..94e19c7b5 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -27,6 +27,12 @@ from the mm_cfg.MAILMAN_SITE_LIST, which must exist. Usage: %(PROGRAM)s [options] Options: + -l listname + --listname=listname + Send password reminders for the named list only. If omitted, + reminders are sent for all lists. Multiple -l/--listname options are + allowed. + -h/--help Print this message and exit. """ @@ -70,16 +76,26 @@ def usage(code, msg=''): def main(): try: - opts, args = getopt.getopt(sys.argv[1:], 'h', ['help']) + opts, args = getopt.getopt(sys.argv[1:], 'l:h', + ['listname=', 'help']) except getopt.error, msg: usage(1, msg) if args: usage(1) + listnames = None for opt, arg in opts: if opt in ('-h', '--help'): usage(0) + if opt in ('-l', '--listname'): + if listnames is None: + listnames = [arg] + else: + listnames.append(arg) + + if listnames is None: + listnames = Utils.list_names() # This is the list that all the reminders will look like they come from, # but with the host name coerced to the virtual host we're processing. @@ -96,7 +112,7 @@ def main(): # there's only one key in this dictionary: mm_cfg.DEFAULT_HOST_NAME. The # values are lists of the unlocked MailList instances. byhost = {} - for listname in Utils.list_names(): + for listname in listnames: mlist = MailList.MailList(listname, lock=0) if not mlist.send_reminders: continue |
