@ever-works/mailgun-plugin 1.0.0 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,11 +13,11 @@ Mailgun email provider plugin for Ever Works (Notifications v2, EW-650).
13
13
  | `apiKey` | yes | `MAILGUN_API_KEY` | yes |
14
14
  | `domain` | no | `MAILGUN_DOMAIN` | yes |
15
15
  | `region` | no | `MAILGUN_REGION` (`us`/`eu`) | no (us) |
16
- | `webhookSigningKey` | yes | `MAILGUN_WEBHOOK_SIGNING_KEY` | no |
16
+ | `webhookSigningKey` | yes | `MAILGUN_WEBHOOK_SIGNING_KEY` | inbound |
17
17
 
18
18
  ## Notes
19
19
 
20
20
  - Outbound is built on the official **`mailgun.js`** SDK (`messages.create`); metadata is forwarded as Mailgun `v:` custom variables.
21
21
  - Inbound HMAC verification uses Node `crypto` — Mailgun ships no SDK helper for inbound-route signature checking.
22
- - Inbound verifies the Mailgun **HMAC-SHA256** signature — `HMAC(signingKey, timestamp + token)` compared in constant time — and decodes both JSON and form-urlencoded webhook shapes. When no signing key is set, verification is skipped (operator opt-in).
22
+ - Inbound verifies the Mailgun **HMAC-SHA256** signature — `HMAC(signingKey, timestamp + token)` compared in constant time — and decodes both JSON and form-urlencoded webhook shapes. When no signing key is set, inbound webhooks are **refused** (`401`); only `EMAIL_INBOUND_ALLOW_UNSIGNED=true` (that exact string, for a local stack with no public webhook URL) accepts them unsigned.
23
23
  - `parseInboundWebhook` maps Mailgun's parsed fields (`sender`/`recipient`/`subject`/`body-plain`/`body-html`). Multipart attachment extraction requires a multipart parser at the controller layer and is left empty here.