diff -Nru flufl.bounce-2.1.1/MANIFEST.in flufl.bounce-2.2.1/MANIFEST.in
--- flufl.bounce-2.1.1/MANIFEST.in 2012-01-04 20:12:25.000000000 +0000
+++ flufl.bounce-2.2.1/MANIFEST.in 2013-06-21 14:28:07.000000000 +0000
@@ -1,4 +1,6 @@
include *.py COPYING.LESSER
exclude *.egg
-global-include *.rst *.txt
+global-include *.rst *.txt *.ini
prune build
+prune dist
+prune .tox
diff -Nru flufl.bounce-2.1.1/PKG-INFO flufl.bounce-2.2.1/PKG-INFO
--- flufl.bounce-2.1.1/PKG-INFO 2012-04-19 22:12:26.000000000 +0000
+++ flufl.bounce-2.2.1/PKG-INFO 2013-06-21 14:30:53.000000000 +0000
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flufl.bounce
-Version: 2.1.1
+Version: 2.2.1
Summary: Email bounce detectors.
Home-page: http://launchpad.net/flufl.bounce
Author: Barry Warsaw
@@ -25,6 +25,8 @@
License
=======
+ Copyright (C) 2004-2013 by Barry A. Warsaw
+
This file is part of flufl.bounce.
flufl.bounce is free software: you can redistribute it and/or modify it
@@ -38,11 +40,40 @@
You should have received a copy of the GNU Lesser General Public License
along with flufl.bounce. If not, see .
+
+
+ Author
+ ======
+
+ Barry Warsaw
+
+ with additional help from Mark Sapiro
+
=====================
NEWS for flufl.bounce
=====================
+ 2.2.1 (2013-06-21)
+ ==================
+ * Prune some artifacts unintentionally leaked into the release tarball.
+
+
+ 2.2 (2013-06-20)
+ ================
+ * Added recognition for a bogus Dovecot over-quota rejection sent as an MDN
+ rather than a DSN. (LP: #693134)
+ * Tweaked a simplematch regexp that didn't always work. (LP: #1079254)
+ * Added recognition for bounces from mail.ru. Thanks to Andrey
+ Rahmatullin. (LP: #1079249)
+ * Fixed UnicodeDecodeError in qmail.py with non-ascii message. Thanks
+ to Theo Spears. (LP: #1074592)
+ * Added recognition for another Yahoo bounce format. Thanks to Mark
+ Sapiro. (LP: #1157961)
+ * Fix documentation bug. (LP: #1026403)
+ * Document the zope.interface requirement. (LP: #1021383)
+
+
2.1.1 (2012-04-19)
==================
* Add classifiers to setup.py and make the long description more compatible
diff -Nru flufl.bounce-2.1.1/README.rst flufl.bounce-2.2.1/README.rst
--- flufl.bounce-2.1.1/README.rst 2012-04-19 22:08:04.000000000 +0000
+++ flufl.bounce-2.2.1/README.rst 2013-06-20 22:45:17.000000000 +0000
@@ -16,6 +16,8 @@
License
=======
+Copyright (C) 2004-2013 by Barry A. Warsaw
+
This file is part of flufl.bounce.
flufl.bounce is free software: you can redistribute it and/or modify it
@@ -29,3 +31,12 @@
You should have received a copy of the GNU Lesser General Public License
along with flufl.bounce. If not, see .
+
+
+Author
+======
+
+Barry Warsaw
+
+with additional help from Mark Sapiro
+
diff -Nru flufl.bounce-2.1.1/debian/changelog flufl.bounce-2.2.1/debian/changelog
--- flufl.bounce-2.1.1/debian/changelog 2012-05-23 18:30:46.000000000 +0000
+++ flufl.bounce-2.2.1/debian/changelog 2013-06-21 14:31:27.000000000 +0000
@@ -1,3 +1,16 @@
+flufl.bounce (2.2.1-1) unstable; urgency=low
+
+ [ Jakub Wilk ]
+ * Use canonical URIs for Vcs-* fields.
+ * Remove DM-Upload-Allowed; it's no longer used by the archive
+ software.
+
+ [ Barry Warsaw ]
+ * New upstream release.
+ * debian/control: Bump Standards-Version to 3.9.4 without further change.
+
+ -- Barry Warsaw Thu, 20 Jun 2013 19:38:30 -0400
+
flufl.bounce (2.1.1-1) unstable; urgency=low
* New upstream release.
diff -Nru flufl.bounce-2.1.1/debian/control flufl.bounce-2.2.1/debian/control
--- flufl.bounce-2.1.1/debian/control 2012-05-23 18:21:45.000000000 +0000
+++ flufl.bounce-2.2.1/debian/control 2013-06-21 02:45:08.000000000 +0000
@@ -18,10 +18,9 @@
python3-pkg-resources,
python3-flufl.enum,
python3-zope.interface
-Standards-Version: 3.9.3
-Vcs-Svn: svn://svn.debian.org/python-modules/packages/flufl.bounce/trunk/
-Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/flufl.bounce/trunk/
-DM-Upload-Allowed: yes
+Standards-Version: 3.9.4
+Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/flufl.bounce/trunk/
+Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/flufl.bounce/trunk/
Package: python-flufl.bounce-doc
Architecture: all
diff -Nru flufl.bounce-2.1.1/flufl/__init__.py flufl.bounce-2.2.1/flufl/__init__.py
--- flufl.bounce-2.1.1/flufl/__init__.py 2012-01-03 12:36:25.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/__init__.py 2013-06-20 22:45:25.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/NEWS.rst flufl.bounce-2.2.1/flufl/bounce/NEWS.rst
--- flufl.bounce-2.1.1/flufl/bounce/NEWS.rst 2012-04-19 22:08:32.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/NEWS.rst 2013-06-21 14:29:57.000000000 +0000
@@ -2,6 +2,26 @@
NEWS for flufl.bounce
=====================
+2.2.1 (2013-06-21)
+==================
+ * Prune some artifacts unintentionally leaked into the release tarball.
+
+
+2.2 (2013-06-20)
+================
+ * Added recognition for a bogus Dovecot over-quota rejection sent as an MDN
+ rather than a DSN. (LP: #693134)
+ * Tweaked a simplematch regexp that didn't always work. (LP: #1079254)
+ * Added recognition for bounces from mail.ru. Thanks to Andrey
+ Rahmatullin. (LP: #1079249)
+ * Fixed UnicodeDecodeError in qmail.py with non-ascii message. Thanks
+ to Theo Spears. (LP: #1074592)
+ * Added recognition for another Yahoo bounce format. Thanks to Mark
+ Sapiro. (LP: #1157961)
+ * Fix documentation bug. (LP: #1026403)
+ * Document the zope.interface requirement. (LP: #1021383)
+
+
2.1.1 (2012-04-19)
==================
* Add classifiers to setup.py and make the long description more compatible
diff -Nru flufl.bounce-2.1.1/flufl/bounce/README.rst flufl.bounce-2.2.1/flufl/bounce/README.rst
--- flufl.bounce-2.1.1/flufl/bounce/README.rst 2012-01-04 20:17:16.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/README.rst 2013-06-20 22:54:28.000000000 +0000
@@ -15,7 +15,7 @@
============
``flufl.bounce`` requires Python 2.6 or newer, and is compatible with
-Python 3.
+Python 3. The `zope.interface`_ package is a requirement.
Documentation
@@ -46,9 +46,12 @@
or from the Launchpad page above. Of course you can also just install it with
``pip`` or ``easy_install`` from the command line::
- % sudo pip flufl.bounce
+ % sudo pip install flufl.bounce
% sudo easy_install flufl.bounce
+You may want to use `virtualenv`_ instead of installing the package into the
+system Python.
+
You can grab the latest development copy of the code using Bazaar, from the
Launchpad home page above. See http://bazaar-vcs.org for details on the
Bazaar distributed revision control system. If you have Bazaar installed, you
@@ -62,7 +65,7 @@
Copyright
=========
-Copyright (C) 2004-2012 Barry A. Warsaw
+Copyright (C) 2004-2013 Barry A. Warsaw
This file is part of flufl.bounce.
@@ -89,3 +92,5 @@
NEWS.rst
.. _`simple guide`: docs/using.html
+.. _`virtualenv`: http://www.virtualenv.org/en/latest/index.html
+.. _`zope.interface`: https://pypi.python.org/pypi/zope.interface
diff -Nru flufl.bounce-2.1.1/flufl/bounce/__init__.py flufl.bounce-2.2.1/flufl/bounce/__init__.py
--- flufl.bounce-2.1.1/flufl/bounce/__init__.py 2012-04-19 22:09:44.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/__init__.py 2013-06-21 14:29:18.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
@@ -26,7 +26,7 @@
]
-__version__ = '2.1.1'
+__version__ = '2.2.1'
from ._scan import all_failures, scan_message
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/aol.py flufl.bounce-2.2.1/flufl/bounce/_detectors/aol.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/aol.py 2012-01-04 18:40:50.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/aol.py 2013-06-20 22:45:57.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2012 by Barry A. Warsaw
+# Copyright (C) 2009-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/caiwireless.py flufl.bounce-2.2.1/flufl/bounce/_detectors/caiwireless.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/caiwireless.py 2012-01-20 00:38:58.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/caiwireless.py 2013-06-20 22:45:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/dsn.py flufl.bounce-2.2.1/flufl/bounce/_detectors/dsn.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/dsn.py 2012-01-04 18:41:23.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/dsn.py 2013-06-20 22:45:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/exchange.py flufl.bounce-2.2.1/flufl/bounce/_detectors/exchange.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/exchange.py 2012-01-04 18:41:39.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/exchange.py 2013-06-20 22:45:55.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 by Barry A. Warsaw
+# Copyright (C) 2002-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/exim.py flufl.bounce-2.2.1/flufl/bounce/_detectors/exim.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/exim.py 2012-01-04 18:41:52.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/exim.py 2013-06-20 22:45:55.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/groupwise.py flufl.bounce-2.2.1/flufl/bounce/_detectors/groupwise.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/groupwise.py 2012-01-04 18:42:09.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/groupwise.py 2013-06-20 22:46:01.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/llnl.py flufl.bounce-2.2.1/flufl/bounce/_detectors/llnl.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/llnl.py 2012-01-04 18:42:22.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/llnl.py 2013-06-20 22:47:01.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 by Barry A. Warsaw
+# Copyright (C) 2001-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/microsoft.py flufl.bounce-2.2.1/flufl/bounce/_detectors/microsoft.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/microsoft.py 2012-01-20 01:09:40.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/microsoft.py 2013-06-20 22:47:01.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/netscape.py flufl.bounce-2.2.1/flufl/bounce/_detectors/netscape.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/netscape.py 2012-01-04 18:42:54.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/netscape.py 2013-06-20 22:47:00.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/postfix.py flufl.bounce-2.2.1/flufl/bounce/_detectors/postfix.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/postfix.py 2012-01-04 18:43:40.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/postfix.py 2013-06-20 22:47:00.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/qmail.py flufl.bounce-2.2.1/flufl/bounce/_detectors/qmail.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/qmail.py 2012-01-04 18:43:56.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/qmail.py 2013-06-20 22:46:59.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
@@ -52,6 +52,7 @@
'Unfortunately, your mail was not delivered',
'Your mail message to the following',
]
+introtags_encoded = [tag.encode('ascii') for tag in introtags]
acre = re.compile(r'<(?P[^>]*)>:')
@@ -73,7 +74,8 @@
for line in body_line_iterator(msg):
line = line.strip()
if state is ParseState.start:
- for introtag in introtags:
+ for introtag in (introtags_encoded
+ if isinstance(line, bytes) else introtags):
if line.startswith(introtag):
state = ParseState.intro_paragraph_seen
break
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/simplematch.py flufl.bounce-2.2.1/flufl/bounce/_detectors/simplematch.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/simplematch.py 2012-01-04 18:44:13.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/simplematch.py 2013-06-20 22:46:58.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
@@ -78,7 +78,7 @@
# sz-sb.de, corridor.com, nfg.nl
(_c('the following addresses had'),
_c('transcript of session follows'),
- _c(r'<(?P[^>]*)>|\(expanded from: (?P[^>)]*)>?\)')),
+ _c(r'^ *(\(expanded from: )?(?P[^\s@]+@[^\s@>]+?)>?\)?\s*$')),
# robanal.demon.co.uk
(_c('this message was created automatically by mail delivery software'),
_c('original message follows'),
@@ -220,6 +220,15 @@
(_c('Message not delivered to the following addresses'),
_c('Error detail'),
_c('\s*(?P[^\s@]+@[^\s@)]+)')),
+ # Dovecot LDA Over quota MDN (bogus - should be DSN).
+ (_c('^Your message'),
+ _c('^Reporting'),
+ _c('Your message to (?P[^\s<@]+@[^\s@>]+)>? was automatically'
+ ' rejected')),
+ # mail.ru
+ (_c('A message that you sent was rejected'),
+ _c('This is a copy of your message'),
+ _c('\s(?P[^\s@]+@[^\s@]+)')),
# Next one goes here...
]
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/simplewarning.py flufl.bounce-2.2.1/flufl/bounce/_detectors/simplewarning.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/simplewarning.py 2012-01-03 12:36:25.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/simplewarning.py 2013-06-20 22:46:58.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 by Barry A. Warsaw
+# Copyright (C) 2001-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/sina.py flufl.bounce-2.2.1/flufl/bounce/_detectors/sina.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/sina.py 2012-01-04 18:44:36.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/sina.py 2013-06-20 22:46:58.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 by Barry A. Warsaw
+# Copyright (C) 2002-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/smtp32.py flufl.bounce-2.2.1/flufl/bounce/_detectors/smtp32.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/smtp32.py 2012-01-04 18:44:54.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/smtp32.py 2013-06-20 22:46:57.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/tests/detectors.py flufl.bounce-2.2.1/flufl/bounce/_detectors/tests/detectors.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/tests/detectors.py 2012-01-03 13:36:55.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/tests/detectors.py 2013-06-20 22:46:57.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
@@ -115,7 +115,8 @@
# Exim bounces
('exim', 'exim_01.txt', [b'delangen@its.tudelft.nl']),
# SimpleMatch bounces
- ('simplematch', 'sendmail_01.txt', [b'zzzzz@nfg.nl']),
+ ('simplematch', 'sendmail_01.txt', [b'zzzzz@shaft.coal.nl',
+ b'zzzzz@nfg.nl']),
('simplematch', 'simple_01.txt', [b'bbbsss@turbosport.com']),
('simplematch', 'simple_02.txt', [b'chris.ggggmmmm@usa.net']),
('simplematch', 'simple_04.txt', [b'claird@starbase.neosoft.com']),
@@ -152,6 +153,8 @@
('simplematch', 'simple_34.txt', [b'roland@xxx.com']),
('simplematch', 'simple_36.txt', [b'garyt@xxx.com']),
('simplematch', 'simple_37.txt', [b'user@uci.edu']),
+ ('simplematch', 'simple_38.txt', [b'prueba@domain.com']),
+ ('simplematch', 'simple_39.txt', [b'foo@mail.ru']),
('simplematch', 'bounce_02.txt', [b'acinsp1@midsouth.rr.com']),
('simplematch', 'bounce_03.txt', [b'james@jeborall.demon.co.uk']),
# SimpleWarning
@@ -210,6 +213,7 @@
('qmail', 'qmail_05.txt', [b'ivokggrrdvc@caixaforte.freeservers.com']),
('qmail', 'qmail_06.txt', [b'ntl@xxx.com']),
('qmail', 'qmail_07.txt', [b'user@example.net']),
+ ('qmail', 'qmail_08.txt', []),
# LLNL's custom Sendmail
('llnl', 'llnl_01.txt', [b'trotts1@llnl.gov']),
# Netscape's server...
@@ -242,6 +246,7 @@
('yahoo', 'yahoo_10.txt', [b'jajcchoo@yahoo.com',
b'lyons94706@yahoo.com',
b'turtle4jne@yahoo.com']),
+ ('yahoo', 'yahoo_11.txt', [b'bad_user@aol.com']),
# sina.com appears to use their own weird SINAEMAIL MTA
('sina', 'sina_01.txt', [b'boboman76@sina.com',
b'alan_t18@sina.com']),
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/yahoo.py flufl.bounce-2.2.1/flufl/bounce/_detectors/yahoo.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/yahoo.py 2012-01-04 18:45:11.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/yahoo.py 2013-06-20 22:46:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2012 by Barry A. Warsaw
+# Copyright (C) 1998-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
@@ -35,14 +35,21 @@
IBounceDetector, NoFailures, NoTemporaryFailures)
-tcre = re.compile(r'message\s+from\s+yahoo\.\S+', re.IGNORECASE)
+tcre = (re.compile(r'message\s+from\s+yahoo\.\S+', re.IGNORECASE),
+ re.compile(r'Sorry, we were unable to deliver your message to '
+ r'the following address(\(es\))?\.',
+ re.IGNORECASE),
+ )
acre = re.compile(r'<(?P[^>]*)>:')
-ecre = re.compile(r'--- Original message follows')
+ecre = (re.compile(r'--- Original message follows'),
+ re.compile(r'--- Below this line is a copy of the message'),
+ )
-class ParseState(Enum):
+class _ParseState(Enum):
start = 0
tag_seen = 1
+ all_done = 2
@@ -58,18 +65,25 @@
if not sender.startswith('mailer-daemon@yahoo'):
return NoFailures
addresses = set()
- state = ParseState.start
+ state = _ParseState.start
for line in body_line_iterator(msg):
line = line.strip()
- if state is ParseState.start and tcre.match(line):
- state = ParseState.tag_seen
- elif state is ParseState.tag_seen:
+ if state is _ParseState.start:
+ for cre in tcre:
+ if cre.match(line):
+ state = _ParseState.tag_seen
+ break
+ elif state is _ParseState.tag_seen:
mo = acre.match(line)
if mo:
addresses.add(mo.group('addr').encode('us-ascii'))
continue
- mo = ecre.match(line)
- if mo:
- # We're at the end of the error response.
+ for cre in ecre:
+ mo = cre.match(line)
+ if mo:
+ # We're at the end of the error response.
+ state = _ParseState.all_done
+ break
+ if state is _ParseState.all_done:
break
return NoTemporaryFailures, addresses
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_detectors/yale.py flufl.bounce-2.2.1/flufl/bounce/_detectors/yale.py
--- flufl.bounce-2.1.1/flufl/bounce/_detectors/yale.py 2012-01-04 18:45:28.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_detectors/yale.py 2013-06-20 22:46:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2012 by Barry A. Warsaw
+# Copyright (C) 2000-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/_scan.py flufl.bounce-2.2.1/flufl/bounce/_scan.py
--- flufl.bounce-2.1.1/flufl/bounce/_scan.py 2012-01-04 12:20:00.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/_scan.py 2013-06-20 22:46:56.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/conf.py flufl.bounce-2.2.1/flufl/bounce/conf.py
--- flufl.bounce-2.1.1/flufl/bounce/conf.py 2012-01-20 00:28:26.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/conf.py 2013-06-20 22:46:55.000000000 +0000
@@ -39,7 +39,7 @@
# General information about the project.
project = 'flufl.bounce'
-copyright = '2004-2012, Barry A. Warsaw'
+copyright = '2004-2013, Barry A. Warsaw'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
diff -Nru flufl.bounce-2.1.1/flufl/bounce/interfaces.py flufl.bounce-2.2.1/flufl/bounce/interfaces.py
--- flufl.bounce-2.1.1/flufl/bounce/interfaces.py 2012-01-20 00:28:53.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/interfaces.py 2013-06-20 22:46:55.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/data/qmail_08.txt flufl.bounce-2.2.1/flufl/bounce/tests/data/qmail_08.txt
--- flufl.bounce-2.1.1/flufl/bounce/tests/data/qmail_08.txt 1970-01-01 00:00:00.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/data/qmail_08.txt 2013-06-20 21:59:48.000000000 +0000
@@ -0,0 +1,24 @@
+From contact@example.com Mon Mar 18 11:39:41 2013
+Return-Path:
+X-Original-To: noreply@example.org
+Delivered-To: noreply@example.org
+Received: from example.com (example.com [1.2.3.4])
+ by worker1.example.org (Postfix) with ESMTP id 58C7E14C1208
+ for ; Mon, 18 Mar 2013 11:39:40 +0000 (GMT)
+Received: from contact by example.com with local (Exim 4.80)
+ (envelope-from )
+ id 1UHYPj-0001DB-Ij
+ for noreply@example.org; Mon, 18 Mar 2013 06:39:39 -0500
+To: "Example Sender"
+MIME-Version: 1.0
+Precedence: auto_reply
+X-Precedence: auto_reply
+From: "Example user"
+Content-type: text/plain; charset=ansi_x3.110-1983
+Subject: Auto reply
+Message-Id:
+Date: Mon, 18 Mar 2013 06:39:39 -0500
+X-Comment: qmail detector would throw UnicodeDecodeError on this message
+X-Comment: when running under Python 2.x. Bug LP: 1074592.
+
+Gracias por contactar con nosotros!! en este instante estamos procesando la respuesta a tu consulta, a la mayor brevedad posible tendr疽 noticias nuestras...
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/data/simple_38.txt flufl.bounce-2.2.1/flufl/bounce/tests/data/simple_38.txt
--- flufl.bounce-2.1.1/flufl/bounce/tests/data/simple_38.txt 1970-01-01 00:00:00.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/data/simple_38.txt 2013-06-20 21:59:48.000000000 +0000
@@ -0,0 +1,70 @@
+Return-Path:
+Delivered-To: user@domain.com
+Received: from localhost (localhost [127.0.0.1])
+ by mail.domain.com (Postfix) with ESMTP id 7043958636E
+ for ; Tue, 21 Dec 2010 14:05:59 -0600 (CST)
+X-Virus-Scanned: Debian amavisd-new at domain.com
+Received: from mail.domain.com ([127.0.0.1])
+ by localhost (mail.domain.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id GV6LC3VuoLKG for ;
+ Tue, 21 Dec 2010 14:05:58 -0600 (CST)
+Received: by mail.domain.com (Postfix, from userid 5000)
+ id BD8D358639E; Tue, 21 Dec 2010 14:05:58 -0600 (CST)
+Message-ID:
+Date: Tue, 21 Dec 2010 14:05:58 -0600
+From: Mail Delivery Subsystem
+To:
+MIME-Version: 1.0
+Content-Type: multipart/report; report-type=disposition-notification;
+ boundary="15778/mail"
+Subject: Automatically rejected mail
+Auto-Submitted: auto-replied (rejected)
+Precedence: bulk
+
+This is a MIME-encapsulated message
+
+--15778/mail
+Content-Type: text/plain; charset=utf-8
+Content-Disposition: inline
+Content-Transfer-Encoding: 8bit
+
+Your message to was automatically rejected:
+Quota exceeded
+--15778/mail
+Content-Type: message/disposition-notification
+
+Reporting-UA: mail; Dovecot Mail Delivery Agent
+Final-Recipient: rfc822; prueba@domain.com
+Original-Message-ID: <2ee7df1322121930966bcc2318379726@localhost>
+Disposition: automatic-action/MDN-sent-automatically; deleted
+
+--15778/mail
+Content-Type: message/rfc822
+
+Return-Path:
+Delivered-To: prueba@domain.com
+Received: from localhost (localhost [127.0.0.1])
+ by mail.domain.com (Postfix) with ESMTP id 2DC8B586389;
+ Tue, 21 Dec 2010 14:05:58 -0600 (CST)
+X-Virus-Scanned: Debian amavisd-new at domain.com
+Received: from mail.domain.com ([127.0.0.1])
+ by localhost (mail.domain.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id XCn4+RhZPLzi; Tue, 21 Dec 2010 14:05:57 -0600 (CST)
+Received: from mail.domain.com (localhost [127.0.0.1])
+ (Authenticated sender: user@domain.com)
+ by mail.domain.com (Postfix) with ESMTPA id 25E7E58636E;
+ Tue, 21 Dec 2010 14:05:57 -0600 (CST)
+Received: from static5.domain.com ([5.5.5.5])
+ by mail.domain.com
+ with HTTP (HTTP/1.1 POST); Tue, 21 Dec 2010 14:05:57 -0600
+MIME-Version: 1.0
+Date: Tue, 21 Dec 2010 14:05:57 -0600
+From:
+To:
+Subject: Testing
+Message-ID: <2ee7df1322121930966bcc2318379726@localhost>
+X-Sender: user@domain.com
+
+
+
+--15778/mail--
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/data/simple_39.txt flufl.bounce-2.2.1/flufl/bounce/tests/data/simple_39.txt
--- flufl.bounce-2.1.1/flufl/bounce/tests/data/simple_39.txt 1970-01-01 00:00:00.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/data/simple_39.txt 2013-06-20 21:59:48.000000000 +0000
@@ -0,0 +1,32 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Auto-Submitted: auto-replied
+Date: Wed, 07 Nov 2012 10:47:34 +0400
+From: Mail Delivery System
+Message-Id:
+Subject: =?utf-8?b?0JLQsNGI0LUg0YHQvtC+0LHRidC10L3QuNC1INC90LUg0LTQvtGB0YLQsNCy0LvQ?=
+ =?utf-8?b?tdC90L4uIE1haWwgZmFpbHVyZS4=?=
+To: noreply@example.com
+Content-Transfer-Encoding: 8bit
+
+ミュムひセ ミソミクムム糊シミセ ムミセミキミエミーミスミセ ミーミイムひセミシミームひクムミオムミコミク ムミオムミイミオムミセミシ Mail.Ru, ミセムひイミオムミームび ミスミー ミスミオミウミセ ミスミオ ミスムσカミスミセ.
+
+ミ ムミセミカミーミサミオミスミクム, ミ漬ーム威オ ミソミクムム糊シミセ ミスミオ ミシミセミカミオム ミアム錦び ミエミセムムひーミイミサミオミスミセ ミセミエミスミセミシム ミクミサミク ミスミオムミコミセミサム糊コミクミシ ミソミセミサムτミームひオミサム紹シ, ミソミセムひセミシム ムムひセ:
+
+ Message was not accepted -- invalid mailbox.
+ Local mailbox foo@mail.ru is unavailable: user not found
+
+**********************
+
+A message that you sent was rejected by the local scanning code that
+checks incoming messages on this system. The following error was given:
+
+ Message was not accepted -- invalid mailbox.
+ Local mailbox foo@mail.ru is unavailable: user not found
+
+------ This is a copy of your message, including all the headers.
+------ No more than 1K characters of the body are included.
+
+Received: from mail by mx183.mail.ru with local (envelope-from )
+ id 1TVzQE-0003tT-Co
+ for foo@mail.ru; Wed, 07 Nov 2012 10:47:34 +0400
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/data/yahoo_11.txt flufl.bounce-2.2.1/flufl/bounce/tests/data/yahoo_11.txt
--- flufl.bounce-2.1.1/flufl/bounce/tests/data/yahoo_11.txt 1970-01-01 00:00:00.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/data/yahoo_11.txt 2013-05-30 13:56:51.000000000 +0000
@@ -0,0 +1,16 @@
+From: MAILER-DAEMON@yahoo.com
+To: user@bellsouth.net
+Date: Wed, 20 Feb 2013 15:50:26 -0000
+Subject: Failure Notice
+
+Sorry, we were unable to deliver your message to the following address.
+
+:
+Remote host said: 550 5.1.1 : Recipient address rejected: aol.com [RCPT_TO]
+
+--- Below this line is a copy of the message.
+
+The following should not be found as we should have stopped looking.
+
+:
+
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/helpers.py flufl.bounce-2.2.1/flufl/bounce/tests/helpers.py
--- flufl.bounce-2.1.1/flufl/bounce/tests/helpers.py 2012-01-03 12:36:25.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/helpers.py 2013-06-20 22:46:55.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/test_detectors.py flufl.bounce-2.2.1/flufl/bounce/tests/test_detectors.py
--- flufl.bounce-2.1.1/flufl/bounce/tests/test_detectors.py 2012-01-20 01:47:58.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/test_detectors.py 2013-06-20 22:46:54.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 by Barry A. Warsaw
+# Copyright (C) 2011-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/flufl/bounce/tests/test_documentation.py flufl.bounce-2.2.1/flufl/bounce/tests/test_documentation.py
--- flufl.bounce-2.1.1/flufl/bounce/tests/test_documentation.py 2012-01-20 00:32:31.000000000 +0000
+++ flufl.bounce-2.2.1/flufl/bounce/tests/test_documentation.py 2013-06-20 22:46:54.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2012 by Barry A. Warsaw
+# Copyright (C) 2004-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce.
#
diff -Nru flufl.bounce-2.1.1/flufl.bounce.egg-info/PKG-INFO flufl.bounce-2.2.1/flufl.bounce.egg-info/PKG-INFO
--- flufl.bounce-2.1.1/flufl.bounce.egg-info/PKG-INFO 2012-04-19 22:12:26.000000000 +0000
+++ flufl.bounce-2.2.1/flufl.bounce.egg-info/PKG-INFO 2013-06-21 14:30:53.000000000 +0000
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flufl.bounce
-Version: 2.1.1
+Version: 2.2.1
Summary: Email bounce detectors.
Home-page: http://launchpad.net/flufl.bounce
Author: Barry Warsaw
@@ -25,6 +25,8 @@
License
=======
+ Copyright (C) 2004-2013 by Barry A. Warsaw
+
This file is part of flufl.bounce.
flufl.bounce is free software: you can redistribute it and/or modify it
@@ -38,11 +40,40 @@
You should have received a copy of the GNU Lesser General Public License
along with flufl.bounce. If not, see .
+
+
+ Author
+ ======
+
+ Barry Warsaw
+
+ with additional help from Mark Sapiro
+
=====================
NEWS for flufl.bounce
=====================
+ 2.2.1 (2013-06-21)
+ ==================
+ * Prune some artifacts unintentionally leaked into the release tarball.
+
+
+ 2.2 (2013-06-20)
+ ================
+ * Added recognition for a bogus Dovecot over-quota rejection sent as an MDN
+ rather than a DSN. (LP: #693134)
+ * Tweaked a simplematch regexp that didn't always work. (LP: #1079254)
+ * Added recognition for bounces from mail.ru. Thanks to Andrey
+ Rahmatullin. (LP: #1079249)
+ * Fixed UnicodeDecodeError in qmail.py with non-ascii message. Thanks
+ to Theo Spears. (LP: #1074592)
+ * Added recognition for another Yahoo bounce format. Thanks to Mark
+ Sapiro. (LP: #1157961)
+ * Fix documentation bug. (LP: #1026403)
+ * Document the zope.interface requirement. (LP: #1021383)
+
+
2.1.1 (2012-04-19)
==================
* Add classifiers to setup.py and make the long description more compatible
diff -Nru flufl.bounce-2.1.1/flufl.bounce.egg-info/SOURCES.txt flufl.bounce-2.2.1/flufl.bounce.egg-info/SOURCES.txt
--- flufl.bounce-2.1.1/flufl.bounce.egg-info/SOURCES.txt 2012-04-19 22:12:26.000000000 +0000
+++ flufl.bounce-2.2.1/flufl.bounce.egg-info/SOURCES.txt 2013-06-21 14:30:53.000000000 +0000
@@ -6,6 +6,7 @@
setup.py
setup_helpers.py
template.py
+tox.ini
flufl/__init__.py
flufl.bounce.egg-info/PKG-INFO
flufl.bounce.egg-info/SOURCES.txt
@@ -90,6 +91,7 @@
flufl/bounce/tests/data/qmail_05.txt
flufl/bounce/tests/data/qmail_06.txt
flufl/bounce/tests/data/qmail_07.txt
+flufl/bounce/tests/data/qmail_08.txt
flufl/bounce/tests/data/sendmail_01.txt
flufl/bounce/tests/data/simple_01.txt
flufl/bounce/tests/data/simple_02.txt
@@ -128,6 +130,8 @@
flufl/bounce/tests/data/simple_35.txt
flufl/bounce/tests/data/simple_36.txt
flufl/bounce/tests/data/simple_37.txt
+flufl/bounce/tests/data/simple_38.txt
+flufl/bounce/tests/data/simple_39.txt
flufl/bounce/tests/data/sina_01.txt
flufl/bounce/tests/data/smtp32_01.txt
flufl/bounce/tests/data/smtp32_02.txt
@@ -146,4 +150,5 @@
flufl/bounce/tests/data/yahoo_08.txt
flufl/bounce/tests/data/yahoo_09.txt
flufl/bounce/tests/data/yahoo_10.txt
+flufl/bounce/tests/data/yahoo_11.txt
flufl/bounce/tests/data/yale_01.txt
\ No newline at end of file
diff -Nru flufl.bounce-2.1.1/setup.py flufl.bounce-2.2.1/setup.py
--- flufl.bounce-2.1.1/setup.py 2012-04-19 22:07:06.000000000 +0000
+++ flufl.bounce-2.2.1/setup.py 2013-06-20 22:46:54.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2012 by Barry A. Warsaw
+# Copyright (C) 2004-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce.
#
diff -Nru flufl.bounce-2.1.1/setup_helpers.py flufl.bounce-2.2.1/setup_helpers.py
--- flufl.bounce-2.1.1/setup_helpers.py 2012-04-19 22:11:02.000000000 +0000
+++ flufl.bounce-2.2.1/setup_helpers.py 2013-06-20 22:46:54.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2012 by Barry A. Warsaw
+# Copyright (C) 2009-2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/template.py flufl.bounce-2.2.1/template.py
--- flufl.bounce-2.1.1/template.py 2012-01-04 19:02:41.000000000 +0000
+++ flufl.bounce-2.2.1/template.py 2013-06-20 22:46:53.000000000 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 by Barry A. Warsaw
+# Copyright (C) 2013 by Barry A. Warsaw
#
# This file is part of flufl.bounce
#
diff -Nru flufl.bounce-2.1.1/tox.ini flufl.bounce-2.2.1/tox.ini
--- flufl.bounce-2.1.1/tox.ini 1970-01-01 00:00:00.000000000 +0000
+++ flufl.bounce-2.2.1/tox.ini 2013-06-20 22:18:39.000000000 +0000
@@ -0,0 +1,5 @@
+[tox]
+envlist = py26, py27, py32, py33
+
+[testenv]
+commands = python setup.py test