Skip to content

Commit 77caad5

Browse files
author
Richard Jones
committed
rfc2822-ify the tracker name in mail headers
1 parent d464221 commit 77caad5

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

doc/upgrading.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Migrating from 0.5 to 0.6
2828

2929
XXX Form handling changed significantly! Document it!
3030

31+
lose :multilink
32+
name:confirm -> :confirm:name
33+
3134

3235
0.6.0 Multilingual character set support
3336
----------------------------------------

roundup/rfc2822.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def encode_header(header):
122122
if not header:
123123
return header
124124

125-
global hqre
126125
# return plain header if it is not contains non-ascii characters
127126
if hqre.match(header):
128127
return header

roundup/roundupdb.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.80 2003-01-27 17:02:46 kedder Exp $
18+
# $Id: roundupdb.py,v 1.81 2003-02-17 06:45:38 richard Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -260,12 +260,13 @@ def send_message(self, nodeid, msgid, note, sendto, from_address=None):
260260
# create the message
261261
message = cStringIO.StringIO()
262262
writer = MimeWriter.MimeWriter(message)
263-
writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, encode_header(title)))
263+
writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid,
264+
encode_header(title)))
264265
writer.addheader('To', ', '.join(sendto))
265266
writer.addheader('From', straddr((encode_header(authname) +
266267
from_tag, from_address)))
267-
writer.addheader('Reply-To', straddr((self.db.config.TRACKER_NAME,
268-
from_address)))
268+
tracker_name = encode_header(self.db.config.TRACKER_NAME)
269+
writer.addheader('Reply-To', straddr((tracker_name, from_address)))
269270
writer.addheader('Date', time.strftime("%a, %d %b %Y %H:%M:%S +0000",
270271
time.gmtime()))
271272
writer.addheader('MIME-Version', '1.0')
@@ -275,7 +276,7 @@ def send_message(self, nodeid, msgid, note, sendto, from_address=None):
275276
writer.addheader('In-Reply-To', inreplyto)
276277

277278
# add a uniquely Roundup header to help filtering
278-
writer.addheader('X-Roundup-Name', self.db.config.TRACKER_NAME)
279+
writer.addheader('X-Roundup-Name', tracker_name)
279280

280281
# avoid email loops
281282
writer.addheader('X-Roundup-Loop', 'hello')

0 commit comments

Comments
 (0)