hmarr/django-ses — pull request #52 by IanLewis (2013-03-17 11:27:03+00:00)
Title: Bounce notifications

This is a pull request for issue #44

The pull request adds a "handle_bounce" view that handles SES bounce and complaint messages via a SNS webhook.

# The View

The "handle_bounce" view accepts a SNS notification message and based on the notification type calls one two new Django signals. If the notification is a bounce message the "bounce_received" signal is called, otherwise if the notification is a complaint the "complaint_received" signal is called.

The view also accepts and and automatically confirms subscription confirmation requests.

# Other changes

The example project hadn't been updated in a while so I updated to make it usable and so It could be used to test SNS messages.

# TODO

Currently the signature of the bounce/cancel requests are not verified. You can add the bounce at a url that cannot be guessed to avoid having bots or other users hitting the bounce handler, but verifying the signature is the best way.