Update of /cvsroot/tmda/tmda/bin
In directory usw-pr-cvs1:/tmp/cvs-serv22275/bin
Modified Files:
ChangeLog tmda-inject
Log Message:
Bugfixes.
First, when creating a dated address for a header, we must reset
$TMDA_TIMEOUT if we are just taking the default timeout override.
Otherwise, the previous value of that variable will be used instead.
e.g,
to * tag
envelope dated=14d
from bare
reply-to dated
Reply-To: was being tagged with a 14d address, even through the
default timeout was only 8d.
Next, the addition of custom headers (e.g, reply-to in the above
example) was accidently left out when deprecating rfc822.
It's amazing the bugs one finds when using features for the first time.
This first bug has been there for upwards of a year, and no-one noticed.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -r1.234 -r1.235
--- ChangeLog 30 Sep 2002 23:45:54 -0000 1.234
+++ ChangeLog 3 Oct 2002 04:51:34 -0000 1.235
@@ -1,3 +1,8 @@
+2002-10-02 Jason R. Mastaler <[EMAIL PROTECTED]>
+
+ * tmda-inject (make_field): Reset $TMDA_TIMEOUT if no timeout
+ override is specified.
+
2002-09-30 Jason R. Mastaler <[EMAIL PROTECTED]>
* tmda-inject: Use the email module instead of the rfc822 module.
Index: tmda-inject
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-inject,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- tmda-inject 30 Sep 2002 23:45:54 -0000 1.69
+++ tmda-inject 3 Oct 2002 04:51:34 -0000 1.70
@@ -166,7 +166,9 @@
elif cookie_type == 'dated':
# Send a message with a tagged (dated) address.
if cookie_option: # check for timeout override
- os.environ['TMDA_TIMEOUT'] = cookie_option
+ os.environ['TMDA_TIMEOUT'] = cookie_option
+ else:
+ os.environ['TMDA_TIMEOUT'] = ''
field = Cookie.make_dated_address(from_address)
elif cookie_type == 'sender':
# Send a message with a tagged (sender) address
@@ -278,7 +280,11 @@
if cookie_type:
field = message_format(field, full_name, Defaults.MESSAGE_FROM_STYLE)
nice_header = string.capwords(header.replace('-', ' ')).replace(' ', '-')
- nice_headers.append('%s: %s\n' % (nice_header, field))
+ nice_headers.append((nice_header, field))
+ if nice_headers:
+ for h, v in nice_headers:
+ del msg[h]
+ msg[h] = v
# Optionally, log this transmission.
if Defaults.LOGFILE_OUTGOING:
from TMDA import MessageLogger
_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs