NL bounces: treat "failed " as a failed action
authorNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Sun, 26 Jan 2014 19:09:42 +0000 (20:09 +0100)
committerNicolas Iooss <nicolas.iooss_git@polytechnique.org>
Mon, 3 Feb 2014 20:08:42 +0000 (21:08 +0100)
Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
bin/newsletter.bounces.processor.py

index b75580d..e55251a 100755 (executable)
@@ -182,7 +182,7 @@ def findAddressInBounce(bounce):
             return None
     email = recipient_match.group(1)
     # Check the action field
-    if content['Action'].lower() != 'failed':
+    if content['Action'].lower().strip() != 'failed':
         print('! Not a failed action (%s).' % content['Action'])
         return None