imap-server
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.
Installation
npm install imap-server
Usage
var ImapServer = ;var server = ; // use pluginvar plugins = ;server;/* use more builtin or custom plugins... */ var net = ;net;
Plugins
Built-in plugins
announce
Required by IMAP4rev1. This plugin also send the optional capability list.
starttls
Provide encrypted communication for IMAP via the STARTTLS command.
server;
debug
This plugin log various information.
authentification helper
Here's how to implement auth plain without worrying about the underlying protocol:
var WrapAuthPlain = ; exportsauth_plain = ;
Notes
-
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 )