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

lmtp-mail-bridge

v1.0.5

Published

Allows a local stmp server to pass data through an lmtp server to the copious endpoint servers.

Readme

lmtp-mail-bridge

Allows a local stmp server to pass data through an lmtp server to the copious endpoint servers.

Install

npm install -g lmtp-mail-bridge

Invoke

lmtp-mail-bridge lmtp_server.conf

About

This is a local mail bridge taking mail from an STMP server such as Postfix and forwarding it on to copious.world endpoint servers.

At copious.world, we have this running on the same server as Postfix. Postfix is configured to forward unknown users to this ltmp server. Those who write descendants of the server class this module provides, SMTPBackendServer can filer emails going forward to endpoint servers.

The Postfix configuration, /etc/postfix/main.cf, starts to look like the following (after a few other lines):

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.example.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = example.net, localhost.localdomain, localhost
local_recipient_maps =
relayhost =
mynetworks = 127.0.0.0/8, 192.168.1.0/24
mailbox_size_limit = 0
mailbox_transport = lmtp:inet:localhost:25

The mailbox transport is set to be internet on the localhost at port 25.

lmtp-mail-bridge relies on the npm package smp-server and its sibling package mailparser to field and parse the mail messages coming in from the smpt server. The message will be turned one or more messages destined to one or two backend servers. One backend servers is a mail endpoint server found in the package copious-endpoints. The other backend server is a persistence server, such as the kind found in persistence-endpoints. The persistence endpoint takes in large files into a repository, reachable by a repository bridge. The lmtp server acts as a client to the persistence endpoint in order to add email attachments to the repository. For each email attachment that it adds, the repository id will be included in the message forwarded to the mail endpoint in place of the data file.

The mail endpoint will process the JSON object representations of the emails it receives and make them available to a special application of a copious-little-searcher, a mail searcher. The mail searcher can be queried by a user interface to get lists of a user's email on a browser based mail user interface.

Writing Special Case

In an npm project, the mail server class may be imported and extended.

In your project directory, run the usual install command:

npm intall -s lmtp-mail-bridge

Then in your code, require the class, SMTPBackendServer

const SMTPBackendServer = require('lmtp-mail-bridge')

Structure of an lmtp_conf file.

Here is an example lmtp_server.conf:

{
	"lmtp_conf" : {
	    "logger" : true,
	    "lmtp" : true,
	    "banner" : 'Welcome to My Awesome LMTP Server',
	    "disabledCommands" : [ "STARTTLS", "AUTH" ],
	    "size" : 10485760
	},
	"endpoint_conf" : {
		"address" : "192.168.0.24",
		"port' " : 5521
	},
	"server_port" : 25,
	"server_host" : "localhost"
}

(where address and port depend on LAN settings)

Starting up endpoint connections

The endpoint server is set up in such a way that another tool on the LAN can request the startup of client services. The endpoint configuration provides parameters for an endpoint server that is of the type com_link_manager. This type of endpoint server waits for messages with configurations for clients to other endpoints.

Until the endpoint clients are configured, messages received by the LTMP server are written to the console. When the clients have been configured and connected, the LMTP server sends messages on to the waiting endpoint servers wherever they may be.

The com_link_manager manager tool must be invoked with configurations destined to the endpoint established by the LMTP server. In this case, the tool will be a temporary client of "192.168.0.24:5521". The com_link_manager should be called twice with one configuration for the mail endpoint server and another configuration to go with the persistence endpoint server.