57
57
import sys, os, re, string
60
os.nice(5) # Handle mailing lists at non-interactive priority.
62
os.chdir(MailmanVar + "/lists")
65
local = string.lower(os.environ["LOCAL"])
67
# This might happen if we're not using qmail.
68
sys.stderr.write("LOCAL not set in environment?\n")
71
names = ("root", "postmaster", "mailer-daemon", "mailman-owner", "owner",
75
os.execv("/usr/bin/sendmail",
76
("/usr/bin/sendmail", MailmanOwner))
80
listname = string.lower(local)
81
types = (("-admin$", "admin"),
82
("-bounces$", "bounces"),
83
("-bounces\+.*$", "bounces"), # for VERP
84
("-confirm$", "confirm"),
85
("-confirm\+.*$", "confirm"),
89
("-request$", "request"),
90
("-subscribe$", "subscribe"),
91
("-unsubscribe$", "unsubscribe"))
94
if re.search(i[0],local):
96
listname = re.sub(i[0],"",local)
98
if os.path.exists(listname):
99
os.execv(MailmanHome + "/mail/mailman",
100
(MailmanHome + "/mail/mailman", type, listname))
60
os.nice(5) # Handle mailing lists at non-interactive priority.
62
os.chdir(MailmanVar + "/lists")
65
local = string.lower(os.environ["LOCAL"])
67
# This might happen if we're not using qmail.
68
sys.stderr.write("LOCAL not set in environment?\n")
71
names = ("root", "postmaster", "mailer-daemon", "mailman-owner", "owner",
75
os.execv("/usr/bin/sendmail",
76
("/usr/bin/sendmail", MailmanOwner))
80
listname = string.lower(local)
81
types = (("-admin$", "admin"),
82
("-bounces$", "bounces"),
83
("-bounces\+.*$", "bounces"), # for VERP
84
("-confirm$", "confirm"),
85
("-confirm\+.*$", "confirm"),
89
("-request$", "request"),
90
("-subscribe$", "subscribe"),
91
("-unsubscribe$", "unsubscribe"))
94
if re.search(i[0],local):
96
listname = re.sub(i[0],"",local)
98
if os.path.exists(listname):
99
os.execv(MailmanHome + "/mail/mailman",
100
(MailmanHome + "/mail/mailman", type, listname))
107
bounce_message = """\
107
bounce_message = """\
108
108
TO ACCESS THE MAILING LIST SYSTEM: Start your web browser on
110
110
That web page will help you subscribe or unsubscribe, and will
111
111
give you directions on how to post to each mailing list.\n"""
112
sys.stderr.write(bounce_message % (os.environ["HOST"]))
112
sys.stderr.write(bounce_message % (os.environ["HOST"]))
117
117
except SystemExit, argument:
120
120
except Exception, argument:
121
info = sys.exc_info()
123
sys.stderr.write("%s %s\n" % (sys.exc_type, argument))
124
sys.stderr.write("LINE %d\n" % (trace.tb_lineno))
125
sys.exit(111) # Soft failure, try again later.
121
info = sys.exc_info()
123
sys.stderr.write("%s %s\n" % (sys.exc_type, argument))
124
sys.stderr.write("LINE %d\n" % (trace.tb_lineno))
125
sys.exit(111) # Soft failure, try again later.