1 Index: Mailman/Archiver/pipermail.py |
1 Index: Mailman/Archiver/pipermail.py |
2 --- Mailman/Archiver/pipermail.py.orig 2008-06-30 18:29:46 +0200 |
2 --- Mailman/Archiver/pipermail.py.orig 2009-02-23 22:23:35 +0100 |
3 +++ Mailman/Archiver/pipermail.py 2008-07-01 20:48:10 +0200 |
3 +++ Mailman/Archiver/pipermail.py 2009-03-27 11:55:18 +0100 |
4 @@ -122,9 +122,9 @@ |
4 @@ -123,9 +123,10 @@ |
5 parentID = article.parentID |
|
6 if parentID is not None and self.articleIndex.has_key(parentID): |
5 if parentID is not None and self.articleIndex.has_key(parentID): |
7 parent = self.getArticle(archive, parentID) |
6 parent = self.getArticle(archive, parentID) |
8 - myThreadKey = parent.threadKey + article.date + '-' |
7 myThreadKey = (parent.threadKey + article.date + '.' |
9 + myThreadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
8 - + str(article.sequence) + '-') |
|
9 + + str(article.sequence) |
|
10 + + '/' + article.msgid + '-') |
10 else: |
11 else: |
11 - myThreadKey = article.date + '-' |
12 - myThreadKey = article.date + '.' + str(article.sequence) + '-' |
12 + myThreadKey = article.date + '/' + article.msgid + '-' |
13 + myThreadKey = article.date + '.' + str(article.sequence) + '/' + article.msgid + '-' |
13 article.threadKey = myThreadKey |
14 article.threadKey = myThreadKey |
14 key = myThreadKey, article.msgid |
15 key = myThreadKey, article.msgid |
15 self.setThreadKey(archive, key, article.msgid) |
16 self.setThreadKey(archive, key, article.msgid) |
16 @@ -418,7 +418,7 @@ |
17 @@ -420,7 +421,7 @@ |
17 else: |
|
18 parent = self.database.getArticle(self.archive, |
18 parent = self.database.getArticle(self.archive, |
19 article.parentID) |
19 article.parentID) |
20 - article.threadKey = parent.threadKey+article.date+'-' |
20 article.threadKey = (parent.threadKey + article.date + '.' |
21 + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
21 - + str(article.sequence) + '-') |
|
22 + + str(article.sequence) + '/' + article.msgid + '-') |
22 self.database.setThreadKey(self.archive, |
23 self.database.setThreadKey(self.archive, |
23 (article.threadKey, article.msgid), |
24 (article.threadKey, article.msgid), |
24 msgid) |
25 msgid) |
25 @@ -632,9 +632,9 @@ |
26 @@ -635,10 +636,10 @@ |
26 article.parentID = parentID = self.get_parent_info(arch, article) |
|
27 if parentID: |
27 if parentID: |
28 parent = self.database.getArticle(arch, parentID) |
28 parent = self.database.getArticle(arch, parentID) |
29 - article.threadKey = parent.threadKey + article.date + '-' |
29 article.threadKey = (parent.threadKey + article.date + '.' |
30 + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
30 - + str(article.sequence) + '-') |
|
31 + + str(article.sequence) + '/' + article.msgid + '-') |
31 else: |
32 else: |
32 - article.threadKey = article.date + '-' |
33 article.threadKey = (article.date + '.' |
33 + article.threadKey = article.date + '/' + article.msgid + '-' |
34 - + str(article.sequence) + '-') |
|
35 + + str(article.sequence) + '/' + article.msgid + '-') |
34 key = article.threadKey, article.msgid |
36 key = article.threadKey, article.msgid |
35 |
37 |
36 self.database.setThreadKey(arch, key, article.msgid) |
38 self.database.setThreadKey(arch, key, article.msgid) |
37 Index: Mailman/Commands/cmd_subscribe.py |
39 Index: Mailman/Commands/cmd_subscribe.py |
38 --- Mailman/Commands/cmd_subscribe.py.orig 2008-06-30 18:29:46 +0200 |
40 --- Mailman/Commands/cmd_subscribe.py.orig 2009-02-23 22:23:35 +0100 |
39 +++ Mailman/Commands/cmd_subscribe.py 2008-07-01 20:48:10 +0200 |
41 +++ Mailman/Commands/cmd_subscribe.py 2009-03-27 11:55:18 +0100 |
40 @@ -84,6 +84,7 @@ |
42 @@ -84,6 +84,7 @@ |
41 if password is None: |
43 if password is None: |
42 password = Utils.MakeRandomPassword() |
44 password = Utils.MakeRandomPassword() |
43 if address is None: |
45 if address is None: |
44 + h = None |
46 + h = None |
45 realname, address = parseaddr(res.msg['from']) |
47 realname, address = parseaddr(res.msg['from']) |
46 if not address: |
48 if not address: |
47 # Fall back to the sender address |
49 # Fall back to the sender address |
48 Index: Mailman/HTMLFormatter.py |
50 Index: Mailman/HTMLFormatter.py |
49 --- Mailman/HTMLFormatter.py.orig 2008-06-30 18:29:46 +0200 |
51 --- Mailman/HTMLFormatter.py.orig 2009-02-23 22:23:35 +0100 |
50 +++ Mailman/HTMLFormatter.py 2008-07-01 20:48:10 +0200 |
52 +++ Mailman/HTMLFormatter.py 2009-03-27 11:55:18 +0100 |
51 @@ -44,7 +44,7 @@ |
53 @@ -44,7 +44,7 @@ |
52 realname = self.real_name |
54 realname = self.real_name |
53 hostname = self.host_name |
55 hostname = self.host_name |
54 listinfo_link = Link(self.GetScriptURL('listinfo'), realname).Format() |
56 listinfo_link = Link(self.GetScriptURL('listinfo'), realname).Format() |
55 - owner_link = Link('mailto:' + self.GetOwnerEmail(), ownertext).Format() |
57 - owner_link = Link('mailto:' + self.GetOwnerEmail(), ownertext).Format() |
56 + owner_link = Link('mailto:' + self.GetOwnerEmail(), realname + '-owner').Format() |
58 + owner_link = Link('mailto:' + self.GetOwnerEmail(), realname + '-owner').Format() |
57 innertext = _('%(listinfo_link)s list run by %(owner_link)s') |
59 innertext = _('%(listinfo_link)s list run by %(owner_link)s') |
58 return Container( |
60 return Container( |
59 '<hr>', |
61 '<hr>', |
60 Index: Mailman/Handlers/Decorate.py |
62 Index: Mailman/Handlers/Decorate.py |
61 --- Mailman/Handlers/Decorate.py.orig 2008-06-30 18:29:46 +0200 |
63 --- Mailman/Handlers/Decorate.py.orig 2009-02-23 22:23:35 +0100 |
62 +++ Mailman/Handlers/Decorate.py 2008-07-01 20:48:10 +0200 |
64 +++ Mailman/Handlers/Decorate.py 2009-03-27 11:55:18 +0100 |
63 @@ -197,6 +197,7 @@ |
65 @@ -205,6 +205,7 @@ |
64 del msg['content-transfer-encoding'] |
66 del msg['content-transfer-encoding'] |
65 del msg['content-disposition'] |
67 del msg['content-disposition'] |
66 msg['Content-Type'] = 'multipart/mixed' |
68 msg['Content-Type'] = 'multipart/mixed' |
67 + msg['Mime-version'] = '1.0' |
69 + msg['Mime-version'] = '1.0' |
68 |
70 |
69 |
71 |
70 |
72 |
71 Index: Mailman/Handlers/Scrubber.py |
73 Index: Mailman/Handlers/Scrubber.py |
72 --- Mailman/Handlers/Scrubber.py.orig 2008-06-30 18:29:46 +0200 |
74 --- Mailman/Handlers/Scrubber.py.orig 2009-02-23 22:23:35 +0100 |
73 +++ Mailman/Handlers/Scrubber.py 2008-07-01 20:48:10 +0200 |
75 +++ Mailman/Handlers/Scrubber.py 2009-03-27 11:55:18 +0100 |
74 @@ -385,6 +385,8 @@ |
76 @@ -368,6 +368,8 @@ |
75 t = unicode(t, 'ascii', 'replace') |
77 t = unicode(t, 'ascii', 'replace') |
76 try: |
78 try: |
77 # Should use HTML-Escape, or try generalizing to UTF-8 |
79 # Should use HTML-Escape, or try generalizing to UTF-8 |
78 + if len(charset) == 0: |
80 + if len(charset) == 0: |
79 + charset = 'us-ascii' |
81 + charset = 'us-ascii' |
80 t = t.encode(charset, 'replace') |
82 t = t.encode(charset, 'replace') |
81 except (UnicodeError, LookupError, ValueError, |
83 except (UnicodeError, LookupError, ValueError, |
82 AssertionError): |
84 AssertionError): |
83 Index: Mailman/Queue/OutgoingRunner.py |
85 Index: Mailman/Queue/OutgoingRunner.py |
84 --- Mailman/Queue/OutgoingRunner.py.orig 2008-06-30 18:29:46 +0200 |
86 --- Mailman/Queue/OutgoingRunner.py.orig 2009-02-23 22:23:35 +0100 |
85 +++ Mailman/Queue/OutgoingRunner.py 2008-07-01 20:48:10 +0200 |
87 +++ Mailman/Queue/OutgoingRunner.py 2009-03-27 11:55:18 +0100 |
86 @@ -89,6 +89,7 @@ |
88 @@ -89,6 +89,7 @@ |
87 syslog('error', 'Cannot connect to SMTP server %s on port %s', |
89 syslog('error', 'Cannot connect to SMTP server %s on port %s', |
88 mm_cfg.SMTPHOST, port) |
90 mm_cfg.SMTPHOST, port) |
89 self.__logged = True |
91 self.__logged = True |
90 + self._snooze(0) |
92 + self._snooze(0) |
91 return True |
93 return True |
92 except Errors.SomeRecipientsFailed, e: |
94 except Errors.SomeRecipientsFailed, e: |
93 # Handle local rejects of probe messages differently. |
95 # Handle local rejects of probe messages differently. |
94 Index: Mailman/htmlformat.py |
96 Index: Mailman/htmlformat.py |
95 --- Mailman/htmlformat.py.orig 2008-06-30 18:29:46 +0200 |
97 --- Mailman/htmlformat.py.orig 2009-02-23 22:23:35 +0100 |
96 +++ Mailman/htmlformat.py 2008-07-01 20:48:10 +0200 |
98 +++ Mailman/htmlformat.py 2009-03-27 11:55:18 +0100 |
97 @@ -300,7 +300,8 @@ |
99 @@ -300,7 +300,8 @@ |
98 charset = 'us-ascii' |
100 charset = 'us-ascii' |
99 if self.language: |
101 if self.language: |
100 charset = Utils.GetCharSet(self.language) |
102 charset = Utils.GetCharSet(self.language) |
101 - output = ['Content-Type: text/html; charset=%s\n' % charset] |
103 - output = ['Content-Type: text/html; charset=%s\n' % charset] |
103 + output.append('Cache-control: no-cache\n') |
105 + output.append('Cache-control: no-cache\n') |
104 if not self.suppress_head: |
106 if not self.suppress_head: |
105 kws.setdefault('bgcolor', self.bgcolor) |
107 kws.setdefault('bgcolor', self.bgcolor) |
106 tab = ' ' * indent |
108 tab = ' ' * indent |
107 Index: bin/check_perms |
109 Index: bin/check_perms |
108 --- bin/check_perms.orig 2008-06-30 18:29:46 +0200 |
110 --- bin/check_perms.orig 2009-02-23 22:23:35 +0100 |
109 +++ bin/check_perms 2008-07-01 20:48:10 +0200 |
111 +++ bin/check_perms 2009-03-27 11:55:18 +0100 |
110 @@ -82,7 +82,7 @@ |
112 @@ -82,7 +82,7 @@ |
111 return os.stat(path)[ST_MODE] |
113 return os.stat(path)[ST_MODE] |
112 |
114 |
113 def statgidmode(path): |
115 def statgidmode(path): |
114 - stat = os.stat(path) |
116 - stat = os.stat(path) |
115 + stat = os.lstat(path) |
117 + stat = os.lstat(path) |
116 return stat[ST_MODE], stat[ST_GID] |
118 return stat[ST_MODE], stat[ST_GID] |
117 |
119 |
118 seen = {} |
120 seen = {} |
119 Index: bin/config_list |
121 Index: bin/config_list |
120 --- bin/config_list.orig 2008-06-30 18:29:46 +0200 |
122 --- bin/config_list.orig 2009-02-23 22:23:35 +0100 |
121 +++ bin/config_list 2008-07-01 20:48:10 +0200 |
123 +++ bin/config_list 2009-03-27 11:55:18 +0100 |
122 @@ -307,6 +307,11 @@ |
124 @@ -307,6 +307,11 @@ |
123 in mm_cfg.OPTINFO.items() |
125 in mm_cfg.OPTINFO.items() |
124 if validval & bitval] |
126 if validval & bitval] |
125 gui._setValue(mlist, k, validval, fakedoc) |
127 gui._setValue(mlist, k, validval, fakedoc) |
126 + # Ugly hack, but seems to be needed since |
128 + # Ugly hack, but seems to be needed since |
130 + mlist.new_member_options = validval |
132 + mlist.new_member_options = validval |
131 # BAW: when to do gui._postValidate()??? |
133 # BAW: when to do gui._postValidate()??? |
132 finally: |
134 finally: |
133 if savelist and not checkonly: |
135 if savelist and not checkonly: |
134 Index: bin/mailmanctl |
136 Index: bin/mailmanctl |
135 --- bin/mailmanctl.orig 2008-06-30 18:29:46 +0200 |
137 --- bin/mailmanctl.orig 2009-02-23 22:23:35 +0100 |
136 +++ bin/mailmanctl 2008-07-01 20:48:10 +0200 |
138 +++ bin/mailmanctl 2009-03-27 11:55:18 +0100 |
137 @@ -417,6 +417,13 @@ |
139 @@ -424,6 +424,12 @@ |
138 # won't be opening any terminal devices, don't do the ultra-paranoid |
140 os.dup2(devnull, 1) |
139 # suggestion of doing a second fork after the setsid() call. |
141 os.dup2(devnull, 2) |
140 os.setsid() |
142 |
141 + |
|
142 + # Be sure to close any open std{in,out,err} |
143 + # Be sure to close any open std{in,out,err} |
143 + devnull = os.open('/dev/null', 0) |
144 + devnull = os.open('/dev/null', 0) |
144 + os.dup2(devnull, 0) |
145 + os.dup2(devnull, 0) |
145 + os.dup2(devnull, 1) |
146 + os.dup2(devnull, 1) |
146 + os.dup2(devnull, 2) |
147 + os.dup2(devnull, 2) |
147 + |
148 + |
148 # Instead of cd'ing to root, cd to the Mailman installation home |
149 # Instead of cd'ing to root, cd to the Mailman installation home |
149 os.chdir(mm_cfg.PREFIX) |
150 os.chdir(mm_cfg.PREFIX) |
150 # Set our file mode creation umask |
151 # Set our file mode creation umask |
151 Index: bin/newlist |
152 Index: bin/newlist |
152 --- bin/newlist.orig 2008-06-30 18:29:46 +0200 |
153 --- bin/newlist.orig 2009-02-23 22:23:35 +0100 |
153 +++ bin/newlist 2008-07-01 20:48:10 +0200 |
154 +++ bin/newlist 2009-03-27 11:58:07 +0100 |
154 @@ -87,6 +87,9 @@ |
155 @@ -88,12 +88,16 @@ |
155 defined in your Defaults.py file or overridden by settings in mm_cfg.py). |
156 defined in your Defaults.py file or overridden by settings in mm_cfg.py). |
156 |
157 |
157 Note that listnames are forced to lowercase. |
158 Note that listnames are forced to lowercase. |
158 + |
159 + |
159 +The list admin address need to be a fully-qualified address, like |
160 +The list admin address need to be a fully-qualified address, like |
160 +owner@example.com, not just owner. |
161 +owner@example.com, not just owner. |
161 """ |
162 """ |
162 |
163 |
163 import sys |
164 import sys |
164 @@ -94,6 +97,7 @@ |
165 import os |
165 import getpass |
166 import getpass |
166 import getopt |
167 import getopt |
167 import sha |
|
168 +import grp |
168 +import grp |
169 |
169 |
170 import paths |
170 import paths |
171 from Mailman import mm_cfg |
171 from Mailman import mm_cfg |
172 @@ -122,6 +126,9 @@ |
172 @@ -122,6 +126,9 @@ |
177 + if os.getgid() != mm_cfg.MAILMAN_GROUP: |
177 + if os.getgid() != mm_cfg.MAILMAN_GROUP: |
178 + os.setgid(gid) |
178 + os.setgid(gid) |
179 try: |
179 try: |
180 opts, args = getopt.getopt(sys.argv[1:], 'hql:u:e:', |
180 opts, args = getopt.getopt(sys.argv[1:], 'hql:u:e:', |
181 ['help', 'quiet', 'language=', |
181 ['help', 'quiet', 'language=', |
182 @@ -203,7 +210,7 @@ |
182 @@ -204,7 +211,7 @@ |
183 except Errors.BadListNameError, s: |
183 except Errors.BadListNameError, s: |
184 usage(1, _('Illegal list name: %(s)s')) |
184 usage(1, _('Illegal list name: %(s)s')) |
185 except Errors.EmailAddressError, s: |
185 except Errors.EmailAddressError, s: |
186 - usage(1, _('Bad owner email address: %(s)s')) |
186 - usage(1, _('Bad owner email address: %(s)s')) |
187 + usage(1, _('Bad owner email address: %(s)s. Owner addresses need to be fully-qualified names, like "owner@example.com", not just "owner".')) |
187 + usage(1, _('Bad owner email address: %(s)s. Owner addresses need to be fully-qualified names, like "owner@example.com", not just "owner".')) |
188 except Errors.MMListAlreadyExistsError: |
188 except Errors.MMListAlreadyExistsError: |
189 usage(1, _('List already exists: %(listname)s')) |
189 usage(1, _('List already exists: %(listname)s')) |
190 |
190 |
191 Index: bin/update |
191 Index: bin/update |
192 --- bin/update.orig 2008-06-30 18:29:46 +0200 |
192 --- bin/update.orig 2009-02-23 22:23:35 +0100 |
193 +++ bin/update 2008-07-01 20:48:10 +0200 |
193 +++ bin/update 2009-03-27 11:55:18 +0100 |
194 @@ -552,9 +552,11 @@ |
194 @@ -554,9 +554,11 @@ |
195 file20 = os.path.join(mm_cfg.DATA_DIR, 'pending_subscriptions.db') |
195 file20 = os.path.join(mm_cfg.DATA_DIR, 'pending_subscriptions.db') |
196 file214 = os.path.join(mm_cfg.DATA_DIR, 'pending.pck') |
196 file214 = os.path.join(mm_cfg.DATA_DIR, 'pending.pck') |
197 db = None |
197 db = None |
198 + ver = None |
198 + ver = None |
199 # Try to load the Mailman 2.0 file |
199 # Try to load the Mailman 2.0 file |