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 🙏

© 2025 – Pkg Stats / Ryan Hefner

inbd

v0.2.7-beta

Published

CLI tool to forward inbound email to webhooks

Downloads

82

Readme

inbd

Email In. Webhook Out. Fully Yours.

NPM

What is inbd?

inbd is a lightweight, open-source CLI tool that turns any email into a webhook.
Designed for developers who want full control over inbound email — without third-party providers, hidden fees, or complex dashboards. It's perfect for:

  • Automating internal workflows
  • Powering no-code tools and bots
  • Building email-based APIs and integrations
  • Replacing inbound services like Mailgun, SendGrid, or Postmark

Why inbd?

Open-Source & Transparent — No hidden SaaS, vendor lock-in, or mystery fees
⚙️ Self-Hosted Freedom — Works on any server, locally or in production
📦 CLI-First — Easy to configure, extend, and deploy via the terminal
📬 Inbound Routing via Wildcards — Match email addresses using simple patterns
🧰 Minimal Setup — Install, configure, and forward in just a few commands
🔒 Private by Default — Your emails never leave your server

Installation

npm install -g inbd

Quick Start

1. Deploy to your server

inbd deploy <user@your-server-ip>

This installs inbd on your remote server, sets it up, and starts the SMTP listener.

2. Configure your domain and server address

inbd config set domain <support.yourdomain.com>
inbd config set server <your-server-ip>
  • domain is the hostname where you'll receive emails (used in MX records)
  • server is the IP or hostname where your inbd server is running

3. Add DNS records

inbd config get dns

Copy the displayed MX and TXT records into your domain registrar (e.g. Cloudflare, GoDaddy).

4. Create a routing rule

inbd rule add support -e "*@support.yourdomain.com" -w "https://yourapp.com/webhook"

Now all emails to addresses like [email protected] will be parsed and forwarded as JSON to your webhook.

Command Overview

Configuration

# Set values
inbd config set domain <support.yourdomain.com>
inbd config set server <your-server-ip>

# View current values
inbd config get domain
inbd config get server
inbd config get dns
inbd config get path

Rules

# Add a new rule
inbd rule add <name> -e <pattern> -w <webhook>

# List all rules
inbd rule list

# Remove a rule by name
inbd rule remove <name>
  • -e, --email: Email pattern using wildcards (*)
  • -w, --webhook: URL to POST parsed email data to

Start Locally

inbd run

Runs the SMTP server locally using your current config and rules.

Deploy to Production

inbd deploy <user@your-server-ip>

Installs inbd and starts it remotely. Your server must be accessible via SSH.

Email Pattern Examples

inbd uses a simple wildcard pattern system for matching email addresses. The pattern must match your configured domain in DNS.

For example, if your DNS is configured for support.domain.com:

Valid patterns:

Invalid patterns:

  • *@other.domain.com - won't work because DNS is configured for support.domain.com
  • *@*.domain.com - wildcards in domain part are not allowed
  • [email protected] - different domain won't be routed to your server

Note: Only the * wildcard character can be used, and only in the local part (before @) of the email address.

Webhook Payload Format

When an email is received, it's POSTed to your webhook as:

{
  "from": "[email protected]",
  "to": "[email protected]",
  "subject": "Email Subject",
  "text": "Plain text content",
  "html": "<strong>HTML content</strong>",
  "attachments": [
    {
      "filename": "file.pdf",
      "contentType": "application/pdf",
      "content": "base64string...",
      "size": 12345
    }
  ]
}

Local Development

  1. Clone and install:
git clone https://github.com/kzkr/inbd.git
cd inbd
npm install -g inbd
  1. Configure your local setup:
# Set your domain
inbd config set domain support.yourdomain.com

# Set your server address
inbd config set server localhost

# Add a rule for testing
inbd rule add test -e "*@support.yourdomain.com" -w "http://localhost:3000/webhook"
  1. Start the server:
inbd run

Note: You'll need to run a separate web server (e.g., using Express.js) to handle the webhook requests at /webhook. This server should be set up independently to receive and process the forwarded emails.

License

MIT — do what you want. No tracking, no analytics, no strings attached.