
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
imap-server
Advanced tools
IMAP Server module for Nodejs
This project is inspired by Haraka a SMTP server for Nodejs. All features of an IMAP server are implemented as plugins, so it can adapt to many use cases.
npm install imap-server
var ImapServer = require('imap-server');
var server = ImapServer();
// use plugin
var plugins = require('imap-server/plugins');
server.use(plugins.announce);
/* use more builtin or custom plugins... */
var net = require('net');
net.createServer(server).listen(process.env.IMAP_PORT || 143);
Required by IMAP4rev1. This plugin also send the optional capability list.
Provide encrypted communication for IMAP via the STARTTLS command.
server.use(plugins.starttls, {
/* mandatory hash of options for crypto.createCredentials
* http://nodejs.org/api/crypto.html#crypto_crypto_createcredentials_details
* with at least key & cert
*/
key: Buffer,
cert: Buffer
});
This plugin log various information.
Here's how to implement auth plain without worrying about the underlying protocol:
var WrapAuthPlain = require('imap-server/util/auth_plain_wrapper');
exports.auth_plain = WrapAuthPlain(function(connection, username, password, next) {
if(username == "john.doe@example.com" && password == "foobar") {
next(null, 'OK');
}
else {
next(null, 'NO');
}
});
Default port : 143
SSL port : 993
rfc3501 (IMAP4rev1) : http://tools.ietf.org/html/rfc3501
return flags : OK, NO, BAD
getCapabilities ( connection ) Sync, return [cap, ...]
register
connection ( connection, next )
starttls ( next )
auth_* ( next )
unknown_command ( connection, line, next )
FAQs
IMAP Server module for Nodejs
We found that imap-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.