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

@rapidrest/mail

v0.2.0

Published

A library for implementing a REST/MAPI/EAS compatible mail server built on RapidREST.

Readme

RapidREST: Mail Library

CI Coverage Status npm version

A library for building a complete mail server on RapidREST — reachable entirely over HTTP/S — aiming for compatibility with MAPI over HTTP (Outlook desktop), Exchange ActiveSync (mobile clients), and a standard RapidREST REST API for webmail/other downstream clients. Integrates Contacts, Calendar (with external sharing and scheduling), Notes/Tasks, full-text search over mail/attachments, and pluggable SPAM/anti-virus scanning.

Internet mail transport (inbound/outbound SMTP) is intentionally out of scope for this library — it hands off to a dedicated MTA (Postfix recommended) via a narrow internal HTTP ingestion boundary. No client (Outlook/EAS/ webmail) ever speaks SMTP/IMAP/POP to this library directly.

Status

This library is under active development. Phase 1 (the core data model, the standard RapidREST CRUD API, mail ingestion/scanning/search), Phase 2 (Exchange ActiveSync), and Autodiscover are complete. MAPI over HTTP (Phase 3) has not been implemented yet.

Exchange ActiveSync support (@rapidrest/mail/eas) covers the pragmatic command subset a real mobile client (iOS Mail, Outlook mobile, Android/Samsung Mail) needs for day-to-day use: Provision, FolderSync, Sync (Email/Contacts/Calendar/Tasks), SendMail/SmartForward/SmartReply, ItemOperations, Ping, Search (GAL), MeetingResponse, and Settings. It authenticates with the same JWT the rest of this library's routes already use — no separate EAS-specific login flow — which means a real native device (rather than a test client that already has a token) needs an OAuth 2.0 Authorization Server role in front of it to obtain one; that piece is tracked as a follow-up in @rapidrest/auth, not this library.

Autodiscover support (@rapidrest/mail/autodiscover) lets a real client find this deployment's EAS server URL from just an email address — classic POX (POST /autodiscover/autodiscover.xml) and the modern JSON variant Microsoft calls "Autodiscover v2" (GET /autodiscover/autodiscover.json/v1.0/<email>?Protocol=ActiveSync). Both endpoints are intentionally unauthenticated, matching Autodiscover v2's own spec design: they reveal nothing but a deployment-wide EAS URL (not a secret) once the requested address is confirmed to belong to a real mailbox here — real mailbox access is still fully gated by the JWT-protected EAS/REST layer, unchanged from above. For a real device to find these endpoints at all, the deployment's DNS needs a CNAME record for autodiscover.<your-domain> (and, optionally, a _autodiscover._tcp SRV record) pointing at wherever this server is mounted — an ops/deployment task, not something this library configures.

Usage

Pick a persistence backend by importing the matching subpath — @rapidrest/mail/mongo or @rapidrest/mail/sql — alongside the protocol-agnostic root import:

import { MailboxRouteMongo, FolderRouteMongo, MessageRouteMongo } from "@rapidrest/mail/mongo";

Register a BlobStore, SearchProvider, SpamScanProvider, AvScanProvider, and MailTransport implementation with your application's dependency injection container before starting the server — see src/blob/BlobStore.ts, src/search/SearchProvider.ts, src/scan/SpamScanProvider.ts/AvScanProvider.ts, and src/transport/MailTransport.ts for the interfaces and their default implementations.

To also serve Exchange ActiveSync, mount EasRouteMongo/EasRouteSQL at the protocol's well-known path with a one-line subclass:

import { EasRouteMongo } from "@rapidrest/mail/mongo";
import { RouteDecorators } from "@rapidrest/service-core";
const { Route } = RouteDecorators;

@Route("/Microsoft-Server-ActiveSync")
export class MyEasRoute extends EasRouteMongo {}

To also serve Autodiscover, mount AutodiscoverRouteMongo/AutodiscoverRouteSQL with a one-line subclass supplying the EAS URL from above:

import { AutodiscoverRouteMongo } from "@rapidrest/mail/mongo";
import { RouteDecorators } from "@rapidrest/service-core";
const { Route } = RouteDecorators;

@Route("/autodiscover")
export class MyAutodiscoverRoute extends AutodiscoverRouteMongo {
    protected readonly easUrl = "https://mail.example.com/Microsoft-Server-ActiveSync";
}