CVS: tmda/bin ChangeLog,1.287,1.287.2.1 tmda-inject,1.92,1.92.2.1
"Jason R. Mastaler" <[email protected]> Wed, 11 Feb 2004 16:26:35 -0800
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8455/bin
Modified Files:
Tag: release-1-0
ChangeLog tmda-inject
Log Message:
Bugfix. When TMDAINJECT was set, Date and Message-ID were
being created and added for each recipient of the message.
This means different recipients might see different values
of these headers.
Now, only add them the first time around so that they are
always identical for multiple recipients.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.287
retrieving revision 1.287.2.1
diff -u -r1.287 -r1.287.2.1
--- ChangeLog 13 Nov 2003 19:28:08 -0000 1.287
+++ ChangeLog 12 Feb 2004 00:26:32 -0000 1.287.2.1
@@ -1,3 +1,8 @@
+2004-02-11 Jason R. Mastaler <[email protected]>
+
+ * tmda-inject (inject_message): Only add Date, Message-ID, and
+ X-Delivery-Agent once per message, not once per recipient.
+
2003-11-13 Tim Legant <[email protected]>
* tmda-ofmipd (class IMAP4_SSL): This local class is only
Index: tmda-inject
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-inject,v
retrieving revision 1.92
retrieving revision 1.92.2.1
diff -u -r1.92 -r1.92.2.1
--- tmda-inject 2 Sep 2003 03:53:52 -0000 1.92
+++ tmda-inject 12 Feb 2004 00:26:32 -0000 1.92.2.1
@@ -259,17 +259,18 @@
new_mft_list.append(emaddy)
del msg['Mail-Followup-To']
msg['Mail-Followup-To'] = string.join(new_mft_list, ',\n\t')
- # Possibly add a `Date' field.
- if 'd' in Defaults.TMDAINJECT or not msg.has_key('date'):
- del msg['Date']
- msg['Date'] = Util.make_date()
- # Possibly add a `Message-ID' field.
- if 'i' in Defaults.TMDAINJECT or not msg.has_key('message-id'):
- del msg['Message-ID']
- msg['Message-ID'] = Util.make_msgid()
- # Add `X-Delivery-Agent' header.
- del msg['X-Delivery-Agent']
- msg['X-Delivery-Agent'] = 'TMDA/%s (%s)' % (Version.TMDA, Version.CODENAME)
+ if injections == 0:
+ # Possibly add a `Date' field.
+ if 'd' in Defaults.TMDAINJECT or not msg.has_key('date'):
+ del msg['Date']
+ msg['Date'] = Util.make_date()
+ # Possibly add a `Message-ID' field.
+ if 'i' in Defaults.TMDAINJECT or not msg.has_key('message-id'):
+ del msg['Message-ID']
+ msg['Message-ID'] = Util.make_msgid()
+ # Add `X-Delivery-Agent' header.
+ del msg['X-Delivery-Agent']
+ msg['X-Delivery-Agent'] = 'TMDA/%s (%s)' % (Version.TMDA, Version.CODENAME)
# Optionally, add an `X-TMDA-Fingerprint' header.
if Defaults.FINGERPRINT:
hdrlist = []