------------------------------------------------------------
revno: 6577
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 3.0
timestamp: Sun 2007-11-11 21:31:22 -0800
message:
  Mailman/Bouncers/SMTP32.py - Added a recognition. Improved address pattern.
  
  Mailman/Bouncers/SimpleMatch.py - Improved two regexps.
  
  Mailman/tests/test_bounces.py - Added a test.
modified:
  Mailman/Bouncers/SMTP32.py
  Mailman/Bouncers/SimpleMatch.py
  Mailman/tests/test_bounces.py

=== modified file 'Mailman/Bouncers/SMTP32.py'
--- a/Mailman/Bouncers/SMTP32.py        2007-01-19 04:38:06 +0000
+++ b/Mailman/Bouncers/SMTP32.py        2007-11-12 05:31:22 +0000
@@ -4,14 +4,14 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software 
+# along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 # USA.
 
@@ -38,9 +38,10 @@
     |delivery\ failed[^:]*:                       # wild...
     |unknown\ user[^:]*:
     |undeliverable\ +to
+    |delivery\ userid[^:]*:
     )
     \s*                                           # space separator
-    (?P<addr>.*)                                  # and finally, the address
+    (?P<addr>[^\s]*)                              # and finally, the address
     ''', re.IGNORECASE | re.VERBOSE)
 
 

=== modified file 'Mailman/Bouncers/SimpleMatch.py'
--- a/Mailman/Bouncers/SimpleMatch.py   2007-01-19 04:38:06 +0000
+++ b/Mailman/Bouncers/SimpleMatch.py   2007-11-12 05:31:22 +0000
@@ -101,7 +101,10 @@
      _c('^(?P<addr>[EMAIL PROTECTED]@[^\s@:]+):')),
     # thehartford.com
     (_c('Delivery to the following recipients failed'),
-     _c("Bogus - there actually isn't anything"),
+     # this one may or may not have the original message, but there's nothing
+     # unique to stop on, so stop on the first line of at least 3 characters
+     # that doesn't start with 'D' (to not stop immediately) and has no '@'.
+     _c('[EMAIL PROTECTED],}$'),
      _c('^\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s*$')),
     # and another thehartfod.com/hartfordlife.com
     (_c('^Your message\s*$'),
@@ -160,7 +163,7 @@
      _c('^-'),
      _c('\s(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])[\s,]')),
     # pla.net.py (MDaemon.PRO ?)
-    (_c('no such user here'),
+    (_c('- no such user here'),
      _c('There is no user'),
      _c('^(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s')),
     # Next one goes here...

=== modified file 'Mailman/tests/test_bounces.py'
--- a/Mailman/tests/test_bounces.py     2007-07-18 15:46:44 +0000
+++ b/Mailman/tests/test_bounces.py     2007-11-12 05:31:22 +0000
@@ -115,6 +115,7 @@
                                      '[EMAIL PROTECTED]']),
         ('SMTP32', 'smtp32_05.txt', ['[EMAIL PROTECTED]']),
         ('SMTP32', 'smtp32_06.txt', ['[EMAIL PROTECTED]']),
+        ('SMTP32', 'smtp32_07.txt', ['[EMAIL PROTECTED]']),
         # Qmail
         ('Qmail', 'qmail_01.txt', ['[EMAIL PROTECTED]']),
         ('Qmail', 'qmail_02.txt', ['[EMAIL PROTECTED]']),



--

https://code.launchpad.net/~mailman-coders/mailman/3.0

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+subscription/mailman-checkins.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to