Skip to content

Commit 338f140

Browse files
author
Richard Jones
committed
Message author's name appears in From: instead of roundup instance name
(which still appears in the Reply-To:) envelope-from is now set to the roundup-admin and not roundup itself so delivery reports aren't sent to roundup (thanks Patrick Ohly)
1 parent cdcc952 commit 338f140

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Feature:
2020
if there are unsaved changes. A "rollback" removes all changes made
2121
during the session (up to the last commit).
2222
. Added the "display" command to the admin tool - displays a node's values
23+
. Message author's name appears in From: instead of roundup instance name
24+
(which still appears in the Reply-To:)
2325

2426
Fixed:
2527
. Lots of bugs, thanks Roch� and others on the devel mailing list!
@@ -39,6 +41,8 @@ Fixed:
3941
. we were assuming database files created by anydbm had the same name, but
4042
this is not the case for dbm. We now perform a much better check _and_
4143
cope with the anydbm implementation module changing too!
44+
. envelope-from is now set to the roundup-admin and not roundup itself so
45+
delivery reports aren't sent to roundup (thanks Patrick Ohly)
4246

4347

4448
2001-11-23 - 0.3.0

roundup-admin

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup-admin,v 1.51 2001-12-10 00:57:38 richard Exp $
19+
# $Id: roundup-admin,v 1.52 2001-12-12 21:47:45 richard Exp $
2020

2121
import sys
2222
if not hasattr(sys, 'version_info') or sys.version_info[:2] < (2,1):
@@ -603,6 +603,11 @@ Command help:
603603
# figure the property names to display
604604
if len(args) > 1:
605605
prop_names = args[1].split(',')
606+
all_props = cl.getprops()
607+
for prop_name in prop_names:
608+
if not all_props.has_key(prop_name):
609+
raise UsageError, '%s has no property "%s"'%(classname,
610+
prop_name)
606611
else:
607612
prop_names = cl.getprops().keys()
608613

@@ -629,8 +634,10 @@ Command help:
629634
try:
630635
value = str(cl.get(nodeid, name))
631636
except KeyError:
632-
raise UsageError, '%s has no property "%s"'%(classname,
633-
name)
637+
# we already checked if the property is valid - a
638+
# KeyError here means the node just doesn't have a
639+
# value for it
640+
value = ''
634641
else:
635642
value = str(nodeid)
636643
f = '%%-%ds'%width
@@ -973,6 +980,16 @@ if __name__ == '__main__':
973980

974981
#
975982
# $Log: not supported by cvs2svn $
983+
# Revision 1.51 2001/12/10 00:57:38 richard
984+
# From CHANGES:
985+
# . Added the "display" command to the admin tool - displays a node's values
986+
# . #489760 ] [issue] only subject
987+
# . fixed the doc/index.html to include the quoting in the mail alias.
988+
#
989+
# Also:
990+
# . fixed roundup-admin so it works with transactions
991+
# . disabled the back_anydbm module if anydbm tries to use dumbdbm
992+
#
976993
# Revision 1.50 2001/12/02 05:06:16 richard
977994
# . We now use weakrefs in the Classes to keep the database reference, so
978995
# the close() method on the database is no longer needed.

roundup/roundupdb.py

Lines changed: 8 additions & 4 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.29 2001-12-11 04:50:49 richard Exp $
18+
# $Id: roundupdb.py,v 1.30 2001-12-12 21:47:45 richard Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -356,8 +356,7 @@ def sendmessage(self, nodeid, msgid):
356356
writer = MimeWriter.MimeWriter(message)
357357
writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, title))
358358
writer.addheader('To', ', '.join(sendto))
359-
writer.addheader('From', '%s <%s>'%(self.INSTANCE_NAME,
360-
self.ISSUE_TRACKER_EMAIL))
359+
writer.addheader('From', '%s <%s>'%(authname, self.ISSUE_TRACKER_EMAIL))
361360
writer.addheader('Reply-To', '%s <%s>'%(self.INSTANCE_NAME,
362361
self.ISSUE_TRACKER_EMAIL))
363362
writer.addheader('MIME-Version', '1.0')
@@ -399,7 +398,9 @@ def sendmessage(self, nodeid, msgid):
399398
# now try to send the message
400399
try:
401400
smtp = smtplib.SMTP(self.MAILHOST)
402-
smtp.sendmail(self.ISSUE_TRACKER_EMAIL, sendto, message.getvalue())
401+
# send the message as admin so bounces are sent there instead
402+
# of to roundup
403+
smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue())
403404
except socket.error, value:
404405
raise MessageSendError, \
405406
"Couldn't send confirmation email: mailhost %s"%value
@@ -491,6 +492,9 @@ def generateChangeNote(self, nodeid, newvalues):
491492

492493
#
493494
# $Log: not supported by cvs2svn $
495+
# Revision 1.29 2001/12/11 04:50:49 richard
496+
# fixed the order of the blank line and '-------' line
497+
#
494498
# Revision 1.28 2001/12/10 22:20:01 richard
495499
# Enabled transaction support in the bsddb backend. It uses the anydbm code
496500
# where possible, only replacing methods where the db is opened (it uses the

0 commit comments

Comments
 (0)