Ubuntu

Merge lp:~logan/ubuntu/quantal/zope.sendmail/new-upstream into lp:ubuntu/quantal/zope.sendmail

Proposed by Logan Rosen on 2012-07-15
Status: Merged
Merged at revision: 6
Proposed branch: lp:~logan/ubuntu/quantal/zope.sendmail/new-upstream
Merge into: lp:ubuntu/quantal/zope.sendmail
Diff against target: 512 lines (+140/-64) 9 files modified
To merge this branch: bzr merge lp:~logan/ubuntu/quantal/zope.sendmail/new-upstream
Reviewer Review Type Date Requested Status
Barry Warsaw Approve on 2012-08-14
Ubuntu branches 2012-07-15 Pending
Review via email: mp+115042@code.launchpad.net
To post a comment you must log in.
Barry Warsaw (barry) wrote :

Thanks again for this contribution to Ubuntu. I've sponsored the upload. Please consider submitting a bug to Debian so that they can update to the latest version too. Please create a bug on the Ubuntu source package to resync to the Debian version once 3.7.5 is available there. Unlike with pytone, there does not yet appear to be a bug against Debian for the new version.

review: Approve

Preview Diff

1=== modified file 'CHANGES.txt'
2--- CHANGES.txt 2011-12-02 15:47:19 +0000
3+++ CHANGES.txt 2012-07-15 23:12:19 +0000
4@@ -2,6 +2,16 @@
5 CHANGES
6 =======
7
8+3.7.5 (2012-05-23)
9+------------------
10+
11+- Ensured that the 'queuedDelivery' directive has the same discriminator
12+ as the 'directDelivery' directive (they are mutually incompatible).
13+ https://bugs.launchpad.net/zope.sendmail/+bug/191143
14+
15+- Avoid requeuing messages after an SMTP "recipients refused" error.
16+ https://bugs.launchpad.net/zope.sendmail/+bug/1003288
17+
18 3.7.4 (2010-10-01)
19 ------------------
20
21
22=== modified file 'PKG-INFO'
23--- PKG-INFO 2011-12-02 15:47:19 +0000
24+++ PKG-INFO 2012-07-15 23:12:19 +0000
25@@ -1,6 +1,6 @@
26 Metadata-Version: 1.0
27 Name: zope.sendmail
28-Version: 3.7.4
29+Version: 3.7.5
30 Summary: Zope sendmail
31 Home-page: http://pypi.python.org/pypi/zope.sendmail
32 Author: Zope Corporation and Contributors
33@@ -58,11 +58,21 @@
34 CHANGES
35 =======
36
37+ 3.7.5 (2012-05-23)
38+ ------------------
39+
40+ - Ensured that the 'queuedDelivery' directive has the same discriminator
41+ as the 'directDelivery' directive (they are mutually incompatible).
42+ https://bugs.launchpad.net/zope.sendmail/+bug/191143
43+
44+ - Avoid requeuing messages after an SMTP "recipients refused" error.
45+ https://bugs.launchpad.net/zope.sendmail/+bug/1003288
46+
47 3.7.4 (2010-10-01)
48 ------------------
49
50 - Handle unicode usernames and passwords, encoding them to UTF-8. Fix for
51- https://bugs.launchpad.net/zope.sendmail/+bug/597143
52+ https://bugs.launchpad.net/zope.sendmail/+bug/597143
53
54 3.7.3 (2010-09-25)
55 ------------------
56@@ -75,7 +85,7 @@
57 - Removed no longer required testing dependency on zope.testing.
58
59 - Maildir storage for queue can now handle unicode passed in for message or
60- to/from addresses (change backported from repoze.sendmail).
61+ to/from addresses (change backported from repoze.sendmail).
62
63 - Tests use stdlib doctest instead of zope.testing.doctest.
64
65@@ -83,55 +93,55 @@
66 ------------------
67
68 - Backward compatibility import of zope.sendmail.queue.QueueProcessorThread in
69- zope.sendmail.delivery.
70+ zope.sendmail.delivery.
71
72 3.7.0 (2010-01-12)
73 ------------------
74
75 - Removed dependency on ``zope.security``: the security support is optional,
76- and only available if the ``zope.security`` package is available. This change
77- is similar to the optional security support introduced in ``zope.component``
78- 3.8.0, and in fact it uses the same helpers.
79+ and only available if the ``zope.security`` package is available. This change
80+ is similar to the optional security support introduced in ``zope.component``
81+ 3.8.0, and in fact it uses the same helpers.
82
83 - Sort by modification time the messages in zope.sendmail.maildir so earlier
84- messages are sent before later messages during queue processing.
85+ messages are sent before later messages during queue processing.
86
87 - Added the new parameter ``processorThread`` to the queuedDelivery ZCML
88- directive: if False, the QueueProcessorThread is not started and thus an
89- independent process must process the queue; it defaults to True for b/c.
90+ directive: if False, the QueueProcessorThread is not started and thus an
91+ independent process must process the queue; it defaults to True for b/c.
92
93 - Provide a console script ``zope-sendmail`` which can be used to process the
94- delivery queue in case processorThread is False. The console script can
95- either process the messages in the queue once, or run in "daemon" mode.
96+ delivery queue in case processorThread is False. The console script can
97+ either process the messages in the queue once, or run in "daemon" mode.
98
99 3.6.1 (2009-11-16)
100 ------------------
101
102 - Depend on ``zope.component`` >= 3.8.0, which supports the new semantic of
103- zope.component.zcml.proxify needed by zope.sendmail.zcml.
104+ zope.component.zcml.proxify needed by zope.sendmail.zcml.
105
106 3.6.0 (2009-09-14)
107 ------------------
108
109 - Use simple vocabulary factory function instead of custom `UtilityTerm`
110- and `UtilityVocabulary` classes, copied from ``zope.app.component`` in
111- the previous release.
112+ and `UtilityVocabulary` classes, copied from ``zope.app.component`` in
113+ the previous release.
114
115 - Depend on the ``transaction`` package instead of ``ZODB3``.
116
117 - Remove zcml slugs and zpkg-related files.
118
119 - Work around problem when used with Python >=2.5.1. See
120- https://bugs.edge.launchpad.net/zope.sendmail/+bug/413335 .
121+ https://bugs.edge.launchpad.net/zope.sendmail/+bug/413335 .
122
123 3.5.1 (2009-01-26)
124 ------------------
125
126 - Copied over the UtilityTerm and UtilityVocabulary implementation from
127- zope.app.component to avoid a dependency.
128+ zope.app.component to avoid a dependency.
129
130 - Work around a problem when smtp quit fails, the mail was considered not
131- delivered where just the quit failed.
132+ delivered where just the quit failed.
133
134 3.5.0 (2008-07-05)
135 ------------------
136@@ -142,8 +152,8 @@
137 --------------------
138
139 - If the SMTP server rejects a message (for example, when the sender or
140- recipient address is malformed), that email stays in the queue forever
141- (https://bugs.launchpad.net/zope3/+bug/157104).
142+ recipient address is malformed), that email stays in the queue forever
143+ (https://bugs.launchpad.net/zope3/+bug/157104).
144
145
146 3.5.0b1 (2007-11-08)
147@@ -153,36 +163,36 @@
148 - Can now talk to servers that don't implement EHLO
149 - Fix bug that caused files with very long names to be created
150 - Fix for https://bugs.launchpad.net/zope3/+bug/157104: move aside mail that's
151- causing 5xx server responses.
152+ causing 5xx server responses.
153
154
155 3.5.0a2 (2007-10-23)
156 --------------------
157
158 - Cleaned up ``does_esmtp`` in faux SMTP connection classes provided by the
159- tests.
160+ tests.
161 - If the ``QueueProcessorThread`` is asked to stop while sending messages, do
162- so after sending the current message; previously if there were many, many
163- messages to send, the thread could stick around for quite a while.
164+ so after sending the current message; previously if there were many, many
165+ messages to send, the thread could stick around for quite a while.
166
167
168 3.5.0a1 (2007-10-23)
169 --------------------
170
171 - ``QueueProcessorThread`` now accepts an optional parameter *interval* for
172- defining how often to process the mail queue (default is 3 seconds)
173+ defining how often to process the mail queue (default is 3 seconds)
174
175 - Several ``QueueProcessorThreads`` (either in the same process, or multiple
176- processes) can now deliver messages from a single maildir without duplicates
177- being sent.
178+ processes) can now deliver messages from a single maildir without duplicates
179+ being sent.
180
181
182 3.4.0 (2007-08-20)
183 --------------------
184
185 - Bugfix: Don't keep open files around for every email message
186- to be sent on transaction commit. People who try to send many emails
187- in a single transaction now will not run out of file descriptors.
188+ to be sent on transaction commit. People who try to send many emails
189+ in a single transaction now will not run out of file descriptors.
190
191
192 3.4.0a1 (2007-04-22)
193
194=== modified file 'debian/changelog'
195--- debian/changelog 2011-12-02 15:47:19 +0000
196+++ debian/changelog 2012-07-15 23:12:19 +0000
197@@ -1,3 +1,12 @@
198+zope.sendmail (3.7.5-0ubuntu1) quantal; urgency=low
199+
200+ * New upstream release.
201+ - Fixes "queuedDelivery should be overridable." (LP: #191143)
202+ - Fixes "SMTPRecipientsRefused not handled in zope.sendmail." (LP: #1003288)
203+ * Bump Standards-Version to 3.9.3.
204+
205+ -- Logan Rosen <logatronico@gmail.com> Sun, 15 Jul 2012 19:07:58 -0400
206+
207 zope.sendmail (3.7.4-2fakesync1) precise; urgency=low
208
209 * Fake sync due to mismatching orig tarball (LP: #899142).
210
211=== modified file 'debian/control'
212--- debian/control 2011-12-02 15:47:19 +0000
213+++ debian/control 2012-07-15 23:12:19 +0000
214@@ -5,7 +5,7 @@
215 XSBC-Original-Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers@lists.alioth.debian.org>
216 Uploaders: Brian Sutherland <brian@vanguardistas.net>
217 Build-Depends: debhelper (>= 7), python-all (>= 2.6.6-3~), python-setuptools
218-Standards-Version: 3.9.2
219+Standards-Version: 3.9.3
220 X-Python-Version: >= 2.4
221 Vcs-Svn: svn://svn.debian.org/pkg-zope/zope.sendmail/trunk
222 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/zope.sendmail/trunk
223
224=== modified file 'setup.py'
225--- setup.py 2011-12-02 15:47:19 +0000
226+++ setup.py 2012-07-15 23:12:19 +0000
227@@ -28,7 +28,7 @@
228
229
230 setup(name='zope.sendmail',
231- version='3.7.4',
232+ version='3.7.5',
233 url='http://pypi.python.org/pypi/zope.sendmail',
234 license='ZPL 2.1',
235 description='Zope sendmail',
236
237=== modified file 'src/zope.sendmail.egg-info/PKG-INFO'
238--- src/zope.sendmail.egg-info/PKG-INFO 2011-12-02 15:47:19 +0000
239+++ src/zope.sendmail.egg-info/PKG-INFO 2012-07-15 23:12:19 +0000
240@@ -1,6 +1,6 @@
241 Metadata-Version: 1.0
242 Name: zope.sendmail
243-Version: 3.7.4
244+Version: 3.7.5
245 Summary: Zope sendmail
246 Home-page: http://pypi.python.org/pypi/zope.sendmail
247 Author: Zope Corporation and Contributors
248@@ -58,11 +58,21 @@
249 CHANGES
250 =======
251
252+ 3.7.5 (2012-05-23)
253+ ------------------
254+
255+ - Ensured that the 'queuedDelivery' directive has the same discriminator
256+ as the 'directDelivery' directive (they are mutually incompatible).
257+ https://bugs.launchpad.net/zope.sendmail/+bug/191143
258+
259+ - Avoid requeuing messages after an SMTP "recipients refused" error.
260+ https://bugs.launchpad.net/zope.sendmail/+bug/1003288
261+
262 3.7.4 (2010-10-01)
263 ------------------
264
265 - Handle unicode usernames and passwords, encoding them to UTF-8. Fix for
266- https://bugs.launchpad.net/zope.sendmail/+bug/597143
267+ https://bugs.launchpad.net/zope.sendmail/+bug/597143
268
269 3.7.3 (2010-09-25)
270 ------------------
271@@ -75,7 +85,7 @@
272 - Removed no longer required testing dependency on zope.testing.
273
274 - Maildir storage for queue can now handle unicode passed in for message or
275- to/from addresses (change backported from repoze.sendmail).
276+ to/from addresses (change backported from repoze.sendmail).
277
278 - Tests use stdlib doctest instead of zope.testing.doctest.
279
280@@ -83,55 +93,55 @@
281 ------------------
282
283 - Backward compatibility import of zope.sendmail.queue.QueueProcessorThread in
284- zope.sendmail.delivery.
285+ zope.sendmail.delivery.
286
287 3.7.0 (2010-01-12)
288 ------------------
289
290 - Removed dependency on ``zope.security``: the security support is optional,
291- and only available if the ``zope.security`` package is available. This change
292- is similar to the optional security support introduced in ``zope.component``
293- 3.8.0, and in fact it uses the same helpers.
294+ and only available if the ``zope.security`` package is available. This change
295+ is similar to the optional security support introduced in ``zope.component``
296+ 3.8.0, and in fact it uses the same helpers.
297
298 - Sort by modification time the messages in zope.sendmail.maildir so earlier
299- messages are sent before later messages during queue processing.
300+ messages are sent before later messages during queue processing.
301
302 - Added the new parameter ``processorThread`` to the queuedDelivery ZCML
303- directive: if False, the QueueProcessorThread is not started and thus an
304- independent process must process the queue; it defaults to True for b/c.
305+ directive: if False, the QueueProcessorThread is not started and thus an
306+ independent process must process the queue; it defaults to True for b/c.
307
308 - Provide a console script ``zope-sendmail`` which can be used to process the
309- delivery queue in case processorThread is False. The console script can
310- either process the messages in the queue once, or run in "daemon" mode.
311+ delivery queue in case processorThread is False. The console script can
312+ either process the messages in the queue once, or run in "daemon" mode.
313
314 3.6.1 (2009-11-16)
315 ------------------
316
317 - Depend on ``zope.component`` >= 3.8.0, which supports the new semantic of
318- zope.component.zcml.proxify needed by zope.sendmail.zcml.
319+ zope.component.zcml.proxify needed by zope.sendmail.zcml.
320
321 3.6.0 (2009-09-14)
322 ------------------
323
324 - Use simple vocabulary factory function instead of custom `UtilityTerm`
325- and `UtilityVocabulary` classes, copied from ``zope.app.component`` in
326- the previous release.
327+ and `UtilityVocabulary` classes, copied from ``zope.app.component`` in
328+ the previous release.
329
330 - Depend on the ``transaction`` package instead of ``ZODB3``.
331
332 - Remove zcml slugs and zpkg-related files.
333
334 - Work around problem when used with Python >=2.5.1. See
335- https://bugs.edge.launchpad.net/zope.sendmail/+bug/413335 .
336+ https://bugs.edge.launchpad.net/zope.sendmail/+bug/413335 .
337
338 3.5.1 (2009-01-26)
339 ------------------
340
341 - Copied over the UtilityTerm and UtilityVocabulary implementation from
342- zope.app.component to avoid a dependency.
343+ zope.app.component to avoid a dependency.
344
345 - Work around a problem when smtp quit fails, the mail was considered not
346- delivered where just the quit failed.
347+ delivered where just the quit failed.
348
349 3.5.0 (2008-07-05)
350 ------------------
351@@ -142,8 +152,8 @@
352 --------------------
353
354 - If the SMTP server rejects a message (for example, when the sender or
355- recipient address is malformed), that email stays in the queue forever
356- (https://bugs.launchpad.net/zope3/+bug/157104).
357+ recipient address is malformed), that email stays in the queue forever
358+ (https://bugs.launchpad.net/zope3/+bug/157104).
359
360
361 3.5.0b1 (2007-11-08)
362@@ -153,36 +163,36 @@
363 - Can now talk to servers that don't implement EHLO
364 - Fix bug that caused files with very long names to be created
365 - Fix for https://bugs.launchpad.net/zope3/+bug/157104: move aside mail that's
366- causing 5xx server responses.
367+ causing 5xx server responses.
368
369
370 3.5.0a2 (2007-10-23)
371 --------------------
372
373 - Cleaned up ``does_esmtp`` in faux SMTP connection classes provided by the
374- tests.
375+ tests.
376 - If the ``QueueProcessorThread`` is asked to stop while sending messages, do
377- so after sending the current message; previously if there were many, many
378- messages to send, the thread could stick around for quite a while.
379+ so after sending the current message; previously if there were many, many
380+ messages to send, the thread could stick around for quite a while.
381
382
383 3.5.0a1 (2007-10-23)
384 --------------------
385
386 - ``QueueProcessorThread`` now accepts an optional parameter *interval* for
387- defining how often to process the mail queue (default is 3 seconds)
388+ defining how often to process the mail queue (default is 3 seconds)
389
390 - Several ``QueueProcessorThreads`` (either in the same process, or multiple
391- processes) can now deliver messages from a single maildir without duplicates
392- being sent.
393+ processes) can now deliver messages from a single maildir without duplicates
394+ being sent.
395
396
397 3.4.0 (2007-08-20)
398 --------------------
399
400 - Bugfix: Don't keep open files around for every email message
401- to be sent on transaction commit. People who try to send many emails
402- in a single transaction now will not run out of file descriptors.
403+ to be sent on transaction commit. People who try to send many emails
404+ in a single transaction now will not run out of file descriptors.
405
406
407 3.4.0a1 (2007-04-22)
408
409=== modified file 'src/zope/sendmail/queue.py'
410--- src/zope/sendmail/queue.py 2011-12-02 15:47:19 +0000
411+++ src/zope/sendmail/queue.py 2012-07-15 23:12:19 +0000
412@@ -15,7 +15,7 @@
413
414 This module contains the queue processor thread.
415
416-$Id: queue.py 107776 2010-01-07 10:37:46Z kobold $
417+$Id: queue.py 126451 2012-05-23 12:23:18Z tseaver $
418 """
419 __docformat__ = 'restructuredtext'
420
421@@ -271,6 +271,12 @@
422 else:
423 # Log an error and retry later
424 raise
425+ except smtplib.SMTPRecipientsRefused, e:
426+ # All recipients are refused by smtp
427+ # server. Dont try to redeliver the message.
428+ self.log.error("Email recipients refused: %s",
429+ ', '.join(e.recipients))
430+ _os_link(filename, rejected_filename)
431
432 try:
433 os.unlink(filename)
434
435=== modified file 'src/zope/sendmail/tests/test_queue.py'
436--- src/zope/sendmail/tests/test_queue.py 2011-12-02 15:47:19 +0000
437+++ src/zope/sendmail/tests/test_queue.py 2012-07-15 23:12:19 +0000
438@@ -15,7 +15,7 @@
439
440 Simple implementation of the MailDelivery, Mailers and MailEvents.
441
442-$Id: test_queue.py 107776 2010-01-07 10:37:46Z kobold $
443+$Id: test_queue.py 126451 2012-05-23 12:23:18Z tseaver $
444 """
445
446 import os.path
447@@ -134,6 +134,27 @@
448 'bar@example.com, baz@example.com',
449 "(550, 'Serious Error')"), {})])
450
451+ def test_smtp_recipients_refused(self):
452+ # Test a permanent error
453+ self.thread.setMailer(SMTPRecipientsRefusedMailerStub(
454+ ['bar@example.com']))
455+ self.filename = os.path.join(self.dir, 'message')
456+ temp = open(self.filename, "w+b")
457+ temp.write('X-Zope-From: foo@example.com\n'
458+ 'X-Zope-To: bar@example.com, baz@example.com\n'
459+ 'Header: value\n\nBody\n')
460+ temp.close()
461+ self.md.files.append(self.filename)
462+ self.thread.run(forever=False)
463+
464+ # File must be moved aside
465+ self.failIf(os.path.exists(self.filename))
466+ self.failUnless(os.path.exists(os.path.join(self.dir,
467+ '.rejected-message')))
468+ self.assertEquals(self.thread.log.errors,
469+ [('Email recipients refused: %s',
470+ ('bar@example.com',), {})])
471+
472 test_ini = """[app:zope-sendmail]
473 interval = 33
474 hostname = testhost
475@@ -253,6 +274,16 @@
476 self.assertFalse(app.no_tls)
477
478
479+class SMTPRecipientsRefusedMailerStub(object):
480+
481+ def __init__(self, recipients):
482+ self.recipients = recipients
483+
484+ def send(self, fromaddr, toaddrs, message):
485+ import smtplib
486+ raise smtplib.SMTPRecipientsRefused(self.recipients)
487+
488+
489 def test_suite():
490 return TestSuite((
491 makeSuite(TestQueueProcessorThread),
492
493=== modified file 'src/zope/sendmail/zcml.py'
494--- src/zope/sendmail/zcml.py 2011-12-02 15:47:19 +0000
495+++ src/zope/sendmail/zcml.py 2012-07-15 23:12:19 +0000
496@@ -13,7 +13,7 @@
497 ##############################################################################
498 """'mail' ZCML Namespaces Schemas
499
500-$Id: zcml.py 107770 2010-01-07 07:11:43Z kobold $
501+$Id: zcml.py 126456 2012-05-23 13:20:12Z tseaver $
502 """
503 __docformat__ = 'restructuredtext'
504
505@@ -105,7 +105,7 @@
506 thread.start()
507
508 _context.action(
509- discriminator = ('delivery', name),
510+ discriminator = ('utility', IMailDelivery, name),
511 callable = createQueuedDelivery,
512 args = () )
513

Subscribers

People subscribed via source and target branches

to all changes: