npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alimzen/relayo-postmark

v0.1.0

Published

Postmark driver for Relayo: sending through the Postmark API and normalized events from its webhooks.

Readme

@alimzen/relayo-postmark

Postmark driver for Relayo: sends through the Postmark API and turns its webhooks into Relayo events. No SDK, no runtime dependencies.

npm install @alimzen/relayo @alimzen/relayo-postmark

Sending

import { createRelayo } from '@alimzen/relayo';
import { postmark } from '@alimzen/relayo-postmark';

const relayo = createRelayo({
  email: postmark({
    serverToken: process.env.POSTMARK_SERVER_TOKEN!,
    webhook: { basicAuth: { username: 'postmark', password: process.env.POSTMARK_WEBHOOK_PASSWORD! } },
  }),
});

| Option | | | --- | --- | | serverToken | Server API token. Required | | messageStream | Message stream (default "outbound", transactional). Use your broadcast stream for bulk mail | | webhook.basicAuth | Credentials you put in the webhook URL (see below) | | webhook.authenticate | Set to false to accept webhooks without credentials | | timeoutMs, baseUrl, fetch, name | Request timeout (default 30 000), endpoint and fetch overrides, provider name (default "postmark") |

  • Relayo's messageId and your metadata travel in Postmark's Metadata, which comes back on every webhook. Postmark's own limits on metadata apply.
  • Postmark accepts one tag per message; more than one is refused with a ValidationError.
  • providerOptions are merged into the request body (e.g. { TrackOpens: true, TrackLinks: 'HtmlAndText' }).

| Postmark answer | Relayo error | Retryable | | --- | --- | --- | | 401, ErrorCode 10 (bad token); 412, 413 (account not approved); 501 (sender signature not found) | AuthenticationError | no | | ErrorCode 406 (inactive recipient: bounced, complained or unsubscribed before) | RejectedError | no | | 429 | RateLimitError | yes | | 5xx, ErrorCode 100/101, network errors | ProviderUnavailableError | yes | | Other 422 (ErrorCode 300, 403...) | ValidationError | no |

Receiving events

Postmark does not sign webhooks. Protect your endpoint with HTTP basic auth: in Postmark, set the webhook URL as https://postmark:<password>@api.example.com/webhooks/postmark and give the same credentials in webhook.basicAuth. Requests without them are refused. Postmark also publishes the IPs it sends webhooks from, if you want to allowlist them.

| Postmark record | Relayo event | | --- | --- | | Delivery | delivered | | Bounce HardBounce, BadEmailAddress | bounced (hard) | | Bounce SoftBounce | bounced (soft) | | Bounce Blocked, DMARCPolicy, SpamNotification, VirusNotification | bounced (block) | | Bounce Transient, DnsError | deferred | | Bounce ManuallyDeactivated, Unconfirmed | rejected (suppressed) | | Bounce SMTPApiError, TemplateRenderingFailed | failed | | SpamComplaint | complained | | SubscriptionChange (suppressed manually: an unsubscribe) | unsubscribed | | Open / Click | opened / clicked (with url) |

Auto-responders, address changes, challenge requests and open relay tests are ignored. Bounces are classified from the SMTP details first, so a HardBounce from a blocklist becomes block, not hard.