Hello community,

here is the log from the commit of package python-seacucumber for 
openSUSE:Factory checked in at 2013-12-04 19:49:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-seacucumber (Old)
 and      /work/SRC/openSUSE:Factory/.python-seacucumber.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-seacucumber"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-seacucumber/python-seacucumber.changes    
2013-10-25 11:31:17.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-seacucumber.new/python-seacucumber.changes   
    2013-12-04 19:49:21.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Nov 19 20:04:51 UTC 2013 - [email protected]
+
+- Update to version 1.5.1
+  + No changelog available
+
+-------------------------------------------------------------------

Old:
----
  seacucumber-1.5.tar.gz

New:
----
  seacucumber-1.5.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-seacucumber.spec ++++++
--- /var/tmp/diff_new_pack.lPXc66/_old  2013-12-04 19:49:21.000000000 +0100
+++ /var/tmp/diff_new_pack.lPXc66/_new  2013-12-04 19:49:21.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python-seacucumber
-Version:        1.5
+Version:        1.5.1
 Release:        0
 Url:            https://github.com/duointeractive/sea-cucumber/
 Summary:        A Django email backend for Amazon Simple Email Service, backed 
by celery

++++++ seacucumber-1.5.tar.gz -> seacucumber-1.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/PKG-INFO 
new/seacucumber-1.5.1/PKG-INFO
--- old/seacucumber-1.5/PKG-INFO        2012-07-16 17:04:09.000000000 +0200
+++ new/seacucumber-1.5.1/PKG-INFO      2013-08-30 20:05:38.000000000 +0200
@@ -1,14 +1,14 @@
 Metadata-Version: 1.1
 Name: seacucumber
-Version: 1.5
+Version: 1.5.1
 Summary: A Django email backend for Amazon Simple Email Service, backed by 
celery.
 Home-page: https://github.com/duointeractive/sea-cucumber/
 Author: Gregory Taylor
 Author-email: [email protected]
 License: MIT
-Description: ================
-        Sea Cucumber 1.5
-        ================
+Description: ==================
+        Sea Cucumber 1.5.1
+        ==================
         :Info: A Django email backend for Amazon Simple Email Service, backed 
by django-celery_
         :Author: DUO Interactive, LLC
         :Inspired by: Harry Marr's django-ses_.
@@ -120,6 +120,43 @@
         sent some emails. You'll need to manually bump up your rate settings in
         ``settings.py``.
         
+        DKIM
+        ====
+        
+        Using DomainKeys_ is entirely optional, however it is recommended by 
Amazon for
+        authenticating your email address and improving delivery success rate. 
 See
+        http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/DKIM.html.
+        Besides authentication, you might also want to consider using DKIM in 
order to
+        remove the `via email-bounces.amazonses.com` message shown to gmail 
users - 
+        see http://support.google.com/mail/bin/answer.py?hl=en&answer=1311182.
+        
+        To enable DKIM signing you should install the pydkim_ package and 
specify values
+        for the ``DKIM_PRIVATE_KEY`` and ``DKIM_DOMAIN`` settings.  You can 
generate a
+        private key with a command such as ``openssl genrsa 1024`` and get the 
public key
+        portion with ``openssl rsa -pubout <private.key``.  The public key 
should be
+        published to ``ses._domainkey.example.com`` if your domain is 
example.com.  You 
+        can use a different name instead of ``ses`` by changing the 
``DKIM_SELECTOR``
+        setting.
+        
+        The SES relay will modify email headers such as `Date` and 
`Message-Id` so by
+        default only the `From`, `To`, `Cc`, `Subject` headers are signed, not 
the full
+        set of headers.  This is sufficient for most DKIM validators but can 
be overridden
+        with the ``DKIM_HEADERS`` setting.
+        
+        
+        Example settings.py::
+        
+           DKIM_DOMAIN = 'example.com'
+           DKIM_PRIVATE_KEY = '''
+           -----BEGIN RSA PRIVATE KEY-----
+           xxxxxxxxxxx
+           -----END RSA PRIVATE KEY-----
+           '''
+        
+        Example DNS record published to Route53 with boto:
+        
+           route53 add_record ZONEID ses._domainkey.example.com. TXT 
'"v=DKIM1; p=xxx"' 86400
+        
         Django Builtin-in Error Emails
         ==============================
         
@@ -149,6 +186,9 @@
         .. _Boto: http://boto.cloudhackers.com/
         .. _SES: http://aws.amazon.com/ses/
         .. _issue tracker: 
https://github.com/duointeractive/django-athumb/issues
+        .. _DomainKeys: http://dkim.org/
+        .. _pydkim: http://hewgill.com/pydkim/
+        
 Platform: any
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/README.rst 
new/seacucumber-1.5.1/README.rst
--- old/seacucumber-1.5/README.rst      2012-07-16 17:00:49.000000000 +0200
+++ new/seacucumber-1.5.1/README.rst    2013-08-30 18:22:58.000000000 +0200
@@ -1,6 +1,6 @@
-================
-Sea Cucumber 1.5
-================
+==================
+Sea Cucumber 1.5.1
+==================
 :Info: A Django email backend for Amazon Simple Email Service, backed by 
django-celery_
 :Author: DUO Interactive, LLC
 :Inspired by: Harry Marr's django-ses_.
@@ -112,6 +112,43 @@
 sent some emails. You'll need to manually bump up your rate settings in
 ``settings.py``.
 
+DKIM
+====
+
+Using DomainKeys_ is entirely optional, however it is recommended by Amazon for
+authenticating your email address and improving delivery success rate.  See
+http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/DKIM.html.
+Besides authentication, you might also want to consider using DKIM in order to
+remove the `via email-bounces.amazonses.com` message shown to gmail users - 
+see http://support.google.com/mail/bin/answer.py?hl=en&answer=1311182.
+
+To enable DKIM signing you should install the pydkim_ package and specify 
values
+for the ``DKIM_PRIVATE_KEY`` and ``DKIM_DOMAIN`` settings.  You can generate a
+private key with a command such as ``openssl genrsa 1024`` and get the public 
key
+portion with ``openssl rsa -pubout <private.key``.  The public key should be
+published to ``ses._domainkey.example.com`` if your domain is example.com.  
You 
+can use a different name instead of ``ses`` by changing the ``DKIM_SELECTOR``
+setting.
+
+The SES relay will modify email headers such as `Date` and `Message-Id` so by
+default only the `From`, `To`, `Cc`, `Subject` headers are signed, not the full
+set of headers.  This is sufficient for most DKIM validators but can be 
overridden
+with the ``DKIM_HEADERS`` setting.
+
+
+Example settings.py::
+
+   DKIM_DOMAIN = 'example.com'
+   DKIM_PRIVATE_KEY = '''
+   -----BEGIN RSA PRIVATE KEY-----
+   xxxxxxxxxxx
+   -----END RSA PRIVATE KEY-----
+   '''
+
+Example DNS record published to Route53 with boto:
+
+   route53 add_record ZONEID ses._domainkey.example.com. TXT '"v=DKIM1; 
p=xxx"' 86400
+
 Django Builtin-in Error Emails
 ==============================
 
@@ -140,4 +177,6 @@
 .. _Django: http://djangoproject.com
 .. _Boto: http://boto.cloudhackers.com/
 .. _SES: http://aws.amazon.com/ses/
-.. _issue tracker: https://github.com/duointeractive/django-athumb/issues
\ No newline at end of file
+.. _issue tracker: https://github.com/duointeractive/django-athumb/issues
+.. _DomainKeys: http://dkim.org/
+.. _pydkim: http://hewgill.com/pydkim/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber/__init__.py 
new/seacucumber-1.5.1/seacucumber/__init__.py
--- old/seacucumber-1.5/seacucumber/__init__.py 2012-07-16 17:00:36.000000000 
+0200
+++ new/seacucumber-1.5.1/seacucumber/__init__.py       2013-08-30 
18:22:58.000000000 +0200
@@ -4,4 +4,4 @@
 rest of the contents of this module are largely optional. 
 """
 # In the form of Major, Minor.
-VERSION = (1, 5)
+VERSION = (1, 5, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber/backend.py 
new/seacucumber-1.5.1/seacucumber/backend.py
--- old/seacucumber-1.5/seacucumber/backend.py  2012-07-16 16:58:04.000000000 
+0200
+++ new/seacucumber-1.5.1/seacucumber/backend.py        2013-08-30 
18:34:27.000000000 +0200
@@ -4,6 +4,7 @@
 
     EMAIL_BACKEND = 'seacucumber.backend.SESBackend'
 """
+
 from django.core.mail.backends.base import BaseEmailBackend
 from seacucumber.tasks import SendEmailTask
 
@@ -12,6 +13,7 @@
     """
     A Django Email backend that uses Amazon's Simple Email Service.
     """
+
     def send_messages(self, email_messages):
         """
         Sends one or more EmailMessage objects and returns the number of
@@ -24,6 +26,7 @@
             queued up. Note that these are not in a state where we can
             guarantee delivery just yet.
         """
+
         num_sent = 0
         for message in email_messages:
             # Hand this off to a celery task.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/seacucumber-1.5/seacucumber/management/commands/ses_address.py 
new/seacucumber-1.5.1/seacucumber/management/commands/ses_address.py
--- old/seacucumber-1.5/seacucumber/management/commands/ses_address.py  
2011-04-14 18:32:56.000000000 +0200
+++ new/seacucumber-1.5.1/seacucumber/management/commands/ses_address.py        
2013-08-30 18:22:58.000000000 +0200
@@ -2,7 +2,8 @@
 Handles management of SES email addresses.
 """
 from django.core.management.base import BaseCommand, CommandError
-from django.core.validators import email_re
+from django.core.validators import validate_email
+from django.core.exceptions import ValidationError
 from seacucumber.util import get_boto_ses_connection
 
 class Command(BaseCommand):
@@ -56,7 +57,7 @@
         """
         Given an action and an email (can be None), figure out what to do
         with the validated inputs.
-        
+
         :param str action: The action. Must be one of self.valid_actions.
         :type email: str or None
         :param email: Either an email address, or None if the action doesn't
@@ -83,7 +84,7 @@
         """
         Convenience method for returning a SES connection, and handling any
         errors that may appear.
-        
+
         :rtype: boto.ses.SESConnection
         """
         try:
@@ -95,11 +96,13 @@
     def _is_valid_email(self, email):
         """
         Given an email address, make sure that it is well-formed.
-        
+
         :param str email: The email address to validate.
         :rtype: bool
         :returns: True if the email address is valid, False if not.
         """
-        if email_re.match(email):
+        try:
+            validate_email(email)
             return True
-        return False
+        except ValidationError:
+            return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/seacucumber-1.5/seacucumber/management/commands/ses_usage.py 
new/seacucumber-1.5.1/seacucumber/management/commands/ses_usage.py
--- old/seacucumber-1.5/seacucumber/management/commands/ses_usage.py    
2011-04-20 15:51:16.000000000 +0200
+++ new/seacucumber-1.5.1/seacucumber/management/commands/ses_usage.py  
2013-02-07 22:23:42.000000000 +0100
@@ -42,11 +42,9 @@
         stats = stats['SendDataPoints']
         
         today = datetime.date.today()
-        yesterday = today - datetime.timedelta(days=1)
         current_day = {'HeaderName': 'Current Day: %s/%s' % (today.month, 
                                                              today.day)}
-        prev_day = {'HeaderName': 'Yesterday: %s/%s' % (yesterday.month,
-                                                        yesterday.day)}
+        prev_day = {'HeaderName': 'Past two weeks'}
         
         for data_point in stats:
             if self._is_data_from_today(data_point):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber/tasks.py 
new/seacucumber-1.5.1/seacucumber/tasks.py
--- old/seacucumber-1.5/seacucumber/tasks.py    2012-04-23 23:44:29.000000000 
+0200
+++ new/seacucumber-1.5.1/seacucumber/tasks.py  2013-08-30 18:31:22.000000000 
+0200
@@ -2,14 +2,18 @@
 Supporting celery tasks go in this module. The primarily interesting one is
 SendEmailTask, which handles sending a single Django EmailMessage object.
 """
+
 import logging
+
 from django.conf import settings
 from celery.task import Task
-from boto.ses.exceptions import SESAddressBlacklistedError, 
SESDomainEndsWithDotError
-from seacucumber.util import get_boto_ses_connection
+from boto.ses.exceptions import SESAddressBlacklistedError, 
SESDomainEndsWithDotError, SESLocalAddressCharacterError, SESIllegalAddressError
+
+from seacucumber.util import get_boto_ses_connection, dkim_sign
 
 logger = logging.getLogger(__name__)
 
+
 class SendEmailTask(Task):
     """
     Sends an email through Boto's SES API module.
@@ -40,7 +44,7 @@
             self.connection.send_raw_email(
                 source=from_email,
                 destinations=recipients,
-                raw_message=message,
+                raw_message=dkim_sign(message),
             )
         except SESAddressBlacklistedError, exc:
             # Blacklisted users are those which delivery failed for in the
@@ -61,11 +65,34 @@
                 extra={'trace': True}
             )
             return False
+        except SESLocalAddressCharacterError, exc:
+            # Invalid character, usually in the sender "name".
+            logger.warning(
+                'Local address contains control or whitespace: %s' % 
recipients,
+                exc_info=exc,
+                extra={'trace': True}
+            )
+            return False
+        except SESIllegalAddressError, exc:
+            # A clearly mal-formed address.
+            logger.warning(
+                'Illegal address: %s' % recipients,
+                exc_info=exc,
+                extra={'trace': True}
+            )
+            return False
         except Exception, exc:
             # Something else happened that we haven't explicitly forbade
             # retry attempts for.
             #noinspection PyUnresolvedReferences
+            logger.error(
+                'Something went wrong; retrying: %s' % recipients,
+                exc_info=exc,
+                extra={'trace': True}
+            )
             self.retry(exc=exc)
+        else:
+            logger.info('An email has been successfully sent: %s' % recipients)
 
         # We shouldn't ever block long enough to see this, but here it is
         # just in case (for debugging?).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber/util.py 
new/seacucumber-1.5.1/seacucumber/util.py
--- old/seacucumber-1.5/seacucumber/util.py     2011-10-28 18:48:20.000000000 
+0200
+++ new/seacucumber-1.5.1/seacucumber/util.py   2013-08-30 18:47:18.000000000 
+0200
@@ -1,9 +1,23 @@
 """
 Various utility functions.
 """
+
 from django.conf import settings
 import boto
 
+# dkim isn't required, but we'll use it if we have it.
+try:
+    import dkim
+    HAS_DKIM = True
+except ImportError:
+    HAS_DKIM = False
+
+DKIM_DOMAIN = getattr(settings, "DKIM_DOMAIN", None)
+DKIM_PRIVATE_KEY = getattr(settings, 'DKIM_PRIVATE_KEY', None)
+DKIM_SELECTOR = getattr(settings, 'DKIM_SELECTOR', 'ses')
+DKIM_HEADERS = getattr(settings, 'DKIM_HEADERS', ('From', 'To', 'Cc', 
'Subject'))
+
+
 def get_boto_ses_connection():
     """
     Shortcut for instantiating and returning a boto SESConnection object.
@@ -11,10 +25,35 @@
     :rtype: boto.ses.SESConnection
     :returns: A boto SESConnection object, from which email sending is done.
     """
-    access_key_id = getattr(settings, 'AWS_ACCESS_KEY_ID', None)
-    access_key = getattr(settings, 'AWS_SECRET_ACCESS_KEY', None)
+
+    access_key_id = getattr(
+        settings, 'CUCUMBER_SES_ACCESS_KEY_ID',
+        getattr(settings, 'AWS_ACCESS_KEY_ID', None))
+    access_key = getattr(
+        settings, 'CUCUMBER_SES_SECRET_ACCESS_KEY',
+        getattr(settings, 'AWS_SECRET_ACCESS_KEY', None))
 
     return boto.connect_ses(
         aws_access_key_id=access_key_id,
         aws_secret_access_key=access_key,
     )
+
+
+def dkim_sign(message):
+    """
+    :returns: A signed email message if dkim package and settings are 
available.
+    """
+
+    if not HAS_DKIM:
+        return message
+
+    if not (DKIM_DOMAIN and DKIM_PRIVATE_KEY):
+        return message
+
+    sig = dkim.sign(
+        message,
+        DKIM_SELECTOR,
+        DKIM_DOMAIN,
+        DKIM_PRIVATE_KEY,
+        include_headers=DKIM_HEADERS)
+    return sig + message
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber.egg-info/PKG-INFO 
new/seacucumber-1.5.1/seacucumber.egg-info/PKG-INFO
--- old/seacucumber-1.5/seacucumber.egg-info/PKG-INFO   2012-07-16 
17:04:09.000000000 +0200
+++ new/seacucumber-1.5.1/seacucumber.egg-info/PKG-INFO 2013-08-30 
20:05:38.000000000 +0200
@@ -1,14 +1,14 @@
 Metadata-Version: 1.1
 Name: seacucumber
-Version: 1.5
+Version: 1.5.1
 Summary: A Django email backend for Amazon Simple Email Service, backed by 
celery.
 Home-page: https://github.com/duointeractive/sea-cucumber/
 Author: Gregory Taylor
 Author-email: [email protected]
 License: MIT
-Description: ================
-        Sea Cucumber 1.5
-        ================
+Description: ==================
+        Sea Cucumber 1.5.1
+        ==================
         :Info: A Django email backend for Amazon Simple Email Service, backed 
by django-celery_
         :Author: DUO Interactive, LLC
         :Inspired by: Harry Marr's django-ses_.
@@ -120,6 +120,43 @@
         sent some emails. You'll need to manually bump up your rate settings in
         ``settings.py``.
         
+        DKIM
+        ====
+        
+        Using DomainKeys_ is entirely optional, however it is recommended by 
Amazon for
+        authenticating your email address and improving delivery success rate. 
 See
+        http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/DKIM.html.
+        Besides authentication, you might also want to consider using DKIM in 
order to
+        remove the `via email-bounces.amazonses.com` message shown to gmail 
users - 
+        see http://support.google.com/mail/bin/answer.py?hl=en&answer=1311182.
+        
+        To enable DKIM signing you should install the pydkim_ package and 
specify values
+        for the ``DKIM_PRIVATE_KEY`` and ``DKIM_DOMAIN`` settings.  You can 
generate a
+        private key with a command such as ``openssl genrsa 1024`` and get the 
public key
+        portion with ``openssl rsa -pubout <private.key``.  The public key 
should be
+        published to ``ses._domainkey.example.com`` if your domain is 
example.com.  You 
+        can use a different name instead of ``ses`` by changing the 
``DKIM_SELECTOR``
+        setting.
+        
+        The SES relay will modify email headers such as `Date` and 
`Message-Id` so by
+        default only the `From`, `To`, `Cc`, `Subject` headers are signed, not 
the full
+        set of headers.  This is sufficient for most DKIM validators but can 
be overridden
+        with the ``DKIM_HEADERS`` setting.
+        
+        
+        Example settings.py::
+        
+           DKIM_DOMAIN = 'example.com'
+           DKIM_PRIVATE_KEY = '''
+           -----BEGIN RSA PRIVATE KEY-----
+           xxxxxxxxxxx
+           -----END RSA PRIVATE KEY-----
+           '''
+        
+        Example DNS record published to Route53 with boto:
+        
+           route53 add_record ZONEID ses._domainkey.example.com. TXT 
'"v=DKIM1; p=xxx"' 86400
+        
         Django Builtin-in Error Emails
         ==============================
         
@@ -149,6 +186,9 @@
         .. _Boto: http://boto.cloudhackers.com/
         .. _SES: http://aws.amazon.com/ses/
         .. _issue tracker: 
https://github.com/duointeractive/django-athumb/issues
+        .. _DomainKeys: http://dkim.org/
+        .. _pydkim: http://hewgill.com/pydkim/
+        
 Platform: any
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/seacucumber.egg-info/requires.txt 
new/seacucumber-1.5.1/seacucumber.egg-info/requires.txt
--- old/seacucumber-1.5/seacucumber.egg-info/requires.txt       2012-07-16 
17:04:09.000000000 +0200
+++ new/seacucumber-1.5.1/seacucumber.egg-info/requires.txt     2013-08-30 
20:05:38.000000000 +0200
@@ -1 +1,2 @@
-boto>=2.3.0
\ No newline at end of file
+boto>=2.8.0
+celery
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seacucumber-1.5/setup.py 
new/seacucumber-1.5.1/setup.py
--- old/seacucumber-1.5/setup.py        2012-07-16 17:01:28.000000000 +0200
+++ new/seacucumber-1.5.1/setup.py      2013-08-30 18:37:04.000000000 +0200
@@ -16,7 +16,7 @@
 
 setup(
     name='seacucumber',
-    version='1.5',
+    version='1.5.1',
     packages=[
         'seacucumber',
         'seacucumber.management',
@@ -30,5 +30,5 @@
     long_description=LONG_DESCRIPTION,
     platforms=['any'],
     classifiers=CLASSIFIERS,
-    install_requires=['boto>=2.3.0'],
+    install_requires=['boto>=2.8.0', 'celery'],
 )

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to