diff options
| author | mailman | 1998-02-25 00:02:00 +0000 |
|---|---|---|
| committer | mailman | 1998-02-25 00:02:00 +0000 |
| commit | 459786da3d357d7b3d4c8b7f1e043b22a2814a3e (patch) | |
| tree | c330398e5158320f13c82cbb47ae1e4424457623 | |
| parent | 32fd7c7f2542d8d366bcb94989b01b5b03574a9f (diff) | |
| download | mailman-459786da3d357d7b3d4c8b7f1e043b22a2814a3e.tar.gz mailman-459786da3d357d7b3d4c8b7f1e043b22a2814a3e.tar.zst mailman-459786da3d357d7b3d4c8b7f1e043b22a2814a3e.zip | |
Initial revision
| -rwxr-xr-x | cron/checkdbs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cron/checkdbs b/cron/checkdbs new file mode 100755 index 000000000..b7dcc9a46 --- /dev/null +++ b/cron/checkdbs @@ -0,0 +1,34 @@ +#!/usr/local/bin/python +# +# This script gets called by cron. +# It checks each list for pending requests, and mails the admin +# of that list if something needs his or her attention. + +import sys, os + +sys.path.append('/home/mailman/mailman/modules') + +import maillist, mm_cfg, mm_message + +dirs = os.listdir(mm_cfg.LIST_DATA_DIR) +for dir in dirs: + if not (os.path.exists(os.path.join( + os.path.join(mm_cfg.LIST_DATA_DIR, dir), 'config.db'))): + continue + try: + list = maillist.MailList(dir) + except: + continue + count = list.RequestsPending() + if count: + list.SendTextToUser(subject = '%d %s admin request(s) waiting' % + (count, list.real_name), + recipient = list.GetAdminEmail(), + text = ''' + The %s mailing list has %d request(s) waiting + for your consideration at: + %s + + Please attend to this at your earliest convenience.''' % + (list.real_name, count, list.GetScriptURL('admindb'))) + list.Unlock() |
