changeset 3645:ff32acc965da

match incoming mail In-Reply-To against existing messages... ...when no issue id is specified in the Subject
author Richard Jones <richard@users.sourceforge.net>
date Thu, 03 Aug 2006 00:50:06 +0000
parents f35ece8f8ff7
children 3a9a6b98c6e6
files CHANGES.txt roundup/mailgw.py
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Mon Jul 31 01:30:05 2006 +0000
+++ b/CHANGES.txt	Thu Aug 03 00:50:06 2006 +0000
@@ -5,6 +5,8 @@
 Feature:
 - full timezone support (sf patch 1465296)
 - handle connection loss when responding to web requests
+- match incoming mail In-Reply-To against existing messages when no issue
+  id is specified in the Subject
 - added StringHTMLProperty wrapped() method to wrap long lines in issue
   display
 
--- a/roundup/mailgw.py	Mon Jul 31 01:30:05 2006 +0000
+++ b/roundup/mailgw.py	Thu Aug 03 00:50:06 2006 +0000
@@ -72,7 +72,7 @@
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception.
 
-$Id: mailgw.py,v 1.175 2006-04-06 06:01:35 a1s Exp $
+$Id: mailgw.py,v 1.176 2006-08-03 00:50:06 richard Exp $
 """
 __docformat__ = 'restructuredtext'
 
@@ -716,6 +716,13 @@
         else:
             nodeid = m.group('nodeid')
 
+        # try in-reply-to to match the message if there's no nodeid
+        inreplyto = message.getheader('in-reply-to') or ''
+        if nodeid is None and inreplyto:
+            l = self.db.getclass('msg').stringFind(inreplyto=inreplyto)
+            if l:
+                nodeid = l[0]
+
         # title is optional too
         title = m.group('title')
         if title:
@@ -930,7 +937,6 @@
         # handle message-id and in-reply-to
         #
         messageid = message.getheader('message-id')
-        inreplyto = message.getheader('in-reply-to') or ''
         # generate a messageid if there isn't one
         if not messageid:
             messageid = "<%s.%s.%s%s@%s>"%(time.time(), random.random(),

Roundup Issue Tracker: http://roundup-tracker.org/