hmarr/django-ses — pull request #31 by paulegan (2012-01-18 08:02:22+00:00)
Title: Support for DKIM signature

This is not specific to SES and ideally DKIM would be handled outside this package, however it's difficult to generate the signature before a message is serialised because the encoding may invalidate the hash and the structure of the Django code makes it difficult to change or override the as_string method of a message (https://code.djangoproject.com/browser/django/trunk/django/core/mail/message.py?rev=17375#L127). Prepending the DKIM signature in the email backend is similar to the solution on django snippets: http://djangosnippets.org/snippets/1995/.

Perhaps the main defence of this hack is that one of the important uses of SES is to improve deliverability and use of DKIM signatures shares a similar goal.