This extension exposes a webhook page to process bounces and complaints from Amazon SES (Simple Email Service) through Amazon SNS (Simple Notification Service) notifications.
The extension is licensed under AGPL-3.0.
See: https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/#installing-a-new-extension
The webhook verifies that the Notification or SubscriptionConfirmation it's been originated and sent by the SNS service (as per SNS docs).
If the Notification is a SubscriptionConfirmation it automatically subscribes to it.
If it's a Bounce, it maps SES' bounce type to Civi's bounce type as follows:
$sesBounceTypes['Undetermined']['Undetermined'] = 'Invalid';
$sesBounceTypes['Permanent']['General'] = 'Invalid';
$sesBounceTypes['Permanent']['NoEmail'] = 'Invalid';
$sesBounceTypes['Permanent']['Suppressed'] = 'Invalid';
$sesBounceTypes['Permanent']['OnAccountSuppressionList'] = 'Invalid';
$sesBounceTypes['Transient']['General'] = 'Relay';
$sesBounceTypes['Transient']['MailboxFull'] = 'Quota';
$sesBounceTypes['Transient']['MessageTooLarge'] = 'Relay';
$sesBounceTypes['Transient']['ContentRejected'] = 'Spam';
$sesBounceTypes['Transient']['AttachmentRejected'] = 'Spam';
If the Notification is a Complaint it creates a bounce in CiviCRM of type Spam and sets the opt-out flag for the contact identified by the email address in the notification.
This is implemented in the same way as used by the coopsymbiotic fork of sparkpost: https://github.com/coopsymbiotic/sparkpost/blob/coopsymbiotic/CRM/Sparkpost/Page/callback.php#L151
Please see Amazon's guide and documentation on how to setup SNS notifications for SES.
Webhook url:
- WordPress: https://example.org/?page=CiviCRM&q=civicrm%2fses%2fwebhook
- Drupal: https://example.org/civicrm/ses/webhook
- Send using API (instead of SMTP)
- UI to create Topic and Subscription without leaving CiviCRM
- Send statistics, and reputation dashlets
- AWS extension: https://github.com/mecachisenros/aws which could replace this extension in the future.
- AirMail extension: https://github.com/aghstrategies/com.aghstrategies.airmail which is similar but handles bounces/complaints in CiviCRM slightly differently and doesn't verify webhook signatures.