Skip to content

xmtpjs/xmtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMTP

⚡️ The Extensible ESMTP Server

Install

$ npm install --save xmtp-core

Usage

Two options:

  • Use Node.js v7+ with --harmony-async-await flag.
  • Use Node.js with Babel using es2017 preset.
const app = require('xmtp-core')();

app.set('me', 'mail.host.com');
app.set('greeting', 'My Server Name');

app.plugin('auth', { ...options });
app.plugin('starttls', { ...options });

app.use('rcpt', async (next, rcpt) => {
	if (rcpt.host === 'host.com') {
		// Allow any @host.com recipient
		return true;
	}

	return await next();
});

app.use('queue', async (next, conn) => {
	// email = { headers, html, text, calendars, attachments }
	const email = conn.transaction.email;

	// Do something with the email (ie. relay, lmtp, save to db, etc...)
});

app.listen(25); // May require sudo privileges.

Documentation

Guides and the API reference are located in the docs directory.

Org Plugins

Community Plugins

SMTP Support

Supported Commands Supported/Planned Extensions No Planned Support
  • HELO
  • 8BITMIME
ATRN
  • EHLO
CHECKPOINT
  • MAIL
  • AUTH=
ENHANGEDSTATUSCODES [sic]
  • RCPT
ETRN
  • DATA
  • BURL
EXPN
  • RSET
SAML, SEND, SOML
  • VRFY
  • DSN
TIME
  • NOOP
  • ENHANCEDSTATUSCODES
TURN
  • HELP
  • PIPELINING
VERB
  • QUIT
  • PROXY (plugin, wip)
X-EXPS
  • SIZE
X-LINK2STATE
  • SMTPUTF8
X-RCPTLIMIT
X-TURNME
XEXCH50
XUSER
XSHADOW

*wip = work in progress

License

MIT

About

Extensible ESMTP Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published