[Mailman-Users] Re: latest CVS... Microsoft.py problem...

Barry A. Warsaw bwarsaw at beopen.com
Wed Sep 13 22:33:12 CEST 2000


Any possibility of forwarding to me the entire message that caused
this?  I'd like to add it to my bounce test suite.

In any event, try this patch.

-Barry

-------------------- snip snip --------------------
Index: Microsoft.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Microsoft.py,v
retrieving revision 1.1
diff -u -r1.1 Microsoft.py
--- Microsoft.py	2000/09/09 03:32:23	1.1
+++ Microsoft.py	2000/09/13 20:29:09
@@ -31,31 +31,34 @@
         return None
     boundary = msg.getparam('boundary')
     msg.fp.seek(0)
-    mfile = multifile.MultiFile(msg.fp)
-    mfile.push(boundary)
-    # find the first subpart, which has no mime type
+    addrs = []
     try:
-        more = mfile.next()
+        mfile = multifile.MultiFile(msg.fp)
+        mfile.push(boundary)
+        # find the first subpart, which has no mime type
+        try:
+            more = mfile.next()
+        except multifile.Error:
+            # the message *looked* like a DSN, but it really wasn't :(
+            return None
+        if not more:
+            # we didn't find it
+            return None
+        # simple state machine
+        #    0 == nothng seen yet
+        #    1 == tag line seen
+        state = 0
+        while 1:
+            line = mfile.readline()
+            if not line:
+                break
+            line = string.strip(line)
+            if state == 0:
+                if scre.search(line):
+                    state = 1
+            if state == 1:
+                if '@' in line:
+                    addrs.append(line)
     except multifile.Error:
-        # the message *looked* like a DSN, but it really wasn't :(
-        return None
-    if not more:
-        # we didn't find it
-        return None
-    addrs = []
-    # simple state machine
-    #    0 == nothng seen yet
-    #    1 == tag line seen
-    state = 0
-    while 1:
-        line = mfile.readline()
-        if not line:
-            break
-        line = string.strip(line)
-        if state == 0:
-            if scre.search(line):
-                state = 1
-        if state == 1:
-            if '@' in line:
-                addrs.append(line)
-    return addrs or []
+        pass
+    return addrs




More information about the Mailman-Users mailing list