Postmark Webhooks receives bounce, spam complaint, delivery and subscription-change notifications and applies suppression before Drupal mail transport. Pair it with the Postmark module or another sending backend.

Features

Installation and configuration

Install with composer require 'drupal/postmark_webhooks:^1.0' and enable Postmark Webhooks. Store the password in settings.php:

$settings['postmark_webhooks.webhook_secret'] = getenv('POSTMARK_WEBHOOK_SECRET') ?: '';

Visit /admin/config/services/postmark-webhook for the routed endpoint, suppression settings and diagnostics. Configure Postmark to send webhooks to that HTTPS endpoint with HTTP Basic Auth, username postmark and the configured password. Preserve the Authorization header through proxies. The endpoint returns 503 without a configured password and 401 for missing or incorrect credentials. Secrets never appear in exported configuration or the settings page.

HardBounce, BadEmailAddress, ManuallyDeactivated and Unsubscribe suppress without a time window. Transient and soft-bounce types use a configurable window, defaulting to 30 days. Complaints have no time limit by default. History retention defaults to 90 days and no longer removes durable suppression. Source policies are optional; existing sites retain the site-wide default.

Requirements and optional integrations

PHP 8.3 or later and Drupal 10.3 or 11. PostgreSQL 16 is the default CI database; MySQL 8.4, MariaDB 10.11 and SQLite are also verified. The optional Postmark Webhooks Mailer adapter is tested with Mailer Plus 1.6.2 and 2.0.2. The receiver needs no API token; the optional reconciliation module reads server tokens from settings. Optional audit_chain dual-write of operator audits is a Composer suggest; there is no hard dependency on Key or Encrypt.

Upgrading

From 1.0.1, run composer require 'drupal/postmark_webhooks:^1.0' and drush cache:rebuild. There is no new update hook. Enable audit_chain separately if you want the optional operator-audit dual-write.

From 1.0.0, back up the database, run composer require 'drupal/postmark_webhooks:^1.0', then drush updatedb -y and drush cache:rebuild. Drupal 11 sites that failed update 10007 on 1.0.0 can complete that update on 1.0.1 or later.

From 1.0.0-alpha2, back up the database, require ^1.0, then run drush updatedb -y and drush cache:rebuild. Update 10007 creates the empty integration outbox table. Optional health, source profiles, integration events, scheduled reconciliation, MessageID timeline and extra retention draining stay off until configured.

From 1.0.0-alpha1, run every update through 10007, including restartable 250-row batches. Updates preserve retained events, backfill suppression state and remove legacy provider free text. Previously discarded history cannot be recovered locally. Review suppression policy before resuming mail; optional submodules must be enabled separately. There is no supported downgrade.

Limits

Support

Maintained by Jeremy Michael Cerda. Development sponsored by Wilkes & Liberty, LLC. Licensed under GPL-2.0-or-later. Listed in the Chronicle package group on Extend.