diff options
| author | bwarsaw | 1998-06-19 19:46:57 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-06-19 19:46:57 +0000 |
| commit | 8d1ec3ae14fcc935284c2fff960265d234ed54e2 (patch) | |
| tree | 67e69a8c365dec4d0ca5c2042795eb298a449f2f /cron | |
| parent | 2ceaa1195001558d1ed1f8718fe329ad437978f3 (diff) | |
| download | mailman-8d1ec3ae14fcc935284c2fff960265d234ed54e2.tar.gz mailman-8d1ec3ae14fcc935284c2fff960265d234ed54e2.tar.zst mailman-8d1ec3ae14fcc935284c2fff960265d234ed54e2.zip | |
Packagized
Diffstat (limited to 'cron')
| -rwxr-xr-x | cron/archive | 8 | ||||
| -rwxr-xr-x | cron/checkdbs | 8 | ||||
| -rwxr-xr-x | cron/gate_news | 13 | ||||
| -rwxr-xr-x | cron/mailpasswds | 45 | ||||
| -rwxr-xr-x | cron/senddigests | 7 | ||||
| -rwxr-xr-x | cron/upvolumes_monthly | 7 | ||||
| -rwxr-xr-x | cron/upvolumes_yearly | 7 |
7 files changed, 44 insertions, 51 deletions
diff --git a/cron/archive b/cron/archive index 8ab32f111..a348832d6 100755 --- a/cron/archive +++ b/cron/archive @@ -26,7 +26,9 @@ import sys import paths -import maillist, mm_cfg, mm_utils +from Mailman import MailList +from Mailman import mm_cfg +from Mailman import Utils def usage(): sys.stderr.write("Usage: %s level\n" % sys.argv[0]) @@ -42,9 +44,9 @@ except ValueError: usage() raise SystemExit, 1 -for name in mm_utils.list_names(): +for name in Utils.list_names(): - list = maillist.MailList(name) + list = MailList.MailList(name) if level <= list.archive_update_frequency: list.UpdateArchive() diff --git a/cron/checkdbs b/cron/checkdbs index 802769e78..35dc2b197 100755 --- a/cron/checkdbs +++ b/cron/checkdbs @@ -20,12 +20,14 @@ import sys, os import paths -import maillist, mm_cfg, mm_message, mm_utils +from Mailman import MailList +from Mailman mm_cfg +from Mailman Utils def main(): - for name in mm_utils.list_names(): - list = maillist.MailList(name, lock = 0) + for name in Utils.list_names(): + list = MailList.MailList(name, lock = 0) count = list.RequestsPending() if count: list.SendTextToUser(subject = '%d %s admin request(s) waiting' % diff --git a/cron/gate_news b/cron/gate_news index b8ba6b2d6..612842990 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -16,10 +16,15 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +import os +import marshal import paths -import maillist, mm_cfg, mm_utils, marshal, os +from Mailman import MailList +from Mailman mm_cfg +from Mailman import Utils -names = mm_utils.list_names() + +names = Utils.list_names() try: file = open(os.path.join(mm_cfg.DATA_DIR, "gate_watermarks"), "r") watermarks = marshal.load(file) @@ -37,7 +42,7 @@ for name in names: wm = 0 # Save the current state to .last, in case we crash while writing out, # and corrupt the file. - list = maillist.MailList(name, lock=0) + list = MailList.MailList(name, lock=0) file = open(os.path.join(mm_cfg.DATA_DIR, "gate_watermarks.last"), "w") marshal.dump(watermarks, file) file.close() @@ -47,4 +52,4 @@ for name in names: # The same messages don't get gated multiple times. file = open(os.path.join(mm_cfg.DATA_DIR, "gate_watermarks"), "w") marshal.dump(watermarks, file) - file.close()
\ No newline at end of file + file.close() diff --git a/cron/mailpasswds b/cron/mailpasswds index 96b41a083..9a0b133e1 100755 --- a/cron/mailpasswds +++ b/cron/mailpasswds @@ -26,34 +26,13 @@ rather than sending a single message for each password.""" import sys, os, string import paths -import maillist, mm_cfg, mm_message, mm_utils +from Mailman import MailList +from Mailman import mm_cfg +from Mailman import Utils users = {} # user: (listname, password, url) -USERPASSWORDSTEXT = """ -This is a reminder, sent out once a month, about your %s -mailing list memberships. It includes your subscription info and -how to use it to change it or unsubscribe from a list. - -Passwords for %s: - -%s -%s -You can visit the URLs to change your membership status or configuration, -including unsubscribing, setting digest-style delivery or disabling -delivery altogether (e.g., for a vacation), and so on. - -In addition to the URL interfaces, you can also use email to make such -changes. For more info, send a message to the '-request' address of the -list (for example, %s-request@%s) containing just -the word 'help' in the message body, and an email message will be sent to -you with instructions. - -If you have questions, problems, comments, etc, send them to -mailman-owner@%s. Thanks! -""" - def MailAllPasswords(list, users): """Send each user their complete list of passwords. @@ -69,12 +48,14 @@ def MailAllPasswords(list, users): table.append("%-10s %-10s\n%s\n" % (l, p, u)) header = ("%-10s %-10s\n%-10s %-10s" % ("List", "Password // URL", "----", "--------")) - text = USERPASSWORDSTEXT % (list.host_name, - user, - header, - string.join(table, "\n"), - l, list.host_name, - list.host_name) + text = Utils.maketext( + 'cronpass.txt', + {'hostname': list.host_name, + 'user' : user, + 'header' : header, + 'table' : string.join(table, '\n'), + 'one_list': l, + }) list.SendTextToUser(subject = subj, recipient = user, text = text, @@ -86,8 +67,8 @@ def main(): the user a single message with the info for all their lists on this site.""" list = None - for name in mm_utils.list_names(): - list = maillist.MailList(name, lock = 0) + for name in Utils.list_names(): + list = MailList.MailList(name, lock = 0) list_name = list.real_name reminders_to_admins = list.reminders_to_admins if not list.send_reminders: diff --git a/cron/senddigests b/cron/senddigests index d073411df..dec7e30a7 100755 --- a/cron/senddigests +++ b/cron/senddigests @@ -22,12 +22,13 @@ Typically it's invoked via cron.""" import sys, os import paths -import maillist, mm_cfg, mm_message, mm_utils +from Mailman import MailList +from Mailman import Utils def main(): - for name in mm_utils.list_names(): - list = maillist.MailList(name, lock=0) + for name in Utils.list_names(): + list = MailList.MailList(name, lock=0) if list.digest_send_periodic: # Send if there are any messages pending. list.SendDigestIfAny() diff --git a/cron/upvolumes_monthly b/cron/upvolumes_monthly index 6a9f58a96..58bf56b7e 100755 --- a/cron/upvolumes_monthly +++ b/cron/upvolumes_monthly @@ -25,12 +25,13 @@ import sys, os import paths -import maillist, mm_cfg, mm_utils +from Mailman import MailList +from Mailman import Utils -for name in mm_utils.list_names(): +for name in Utils.list_names(): try: - list = maillist.MailList(name) + list = MailList.MailList(name) except: continue list.UpdateArchive() diff --git a/cron/upvolumes_yearly b/cron/upvolumes_yearly index cca4a4d33..304b2de39 100755 --- a/cron/upvolumes_yearly +++ b/cron/upvolumes_yearly @@ -25,12 +25,13 @@ import sys, os import paths -import maillist, mm_cfg, mm_utils +from Mailman import MailList +from Mailman import Utils -for name in mm_utils.list_names(): +for name in Utils.list_names(): try: - list = maillist.MailList(name) + list = MailList.MailList(name) except: continue list.UpdateArchive() |
