0.0.6 • Published 10 years ago

joltra-imap-server v0.0.6

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

joltra-imap-server

IMAP Server module for Nodejs

I needed an IMAP command parser and server which I could easily modify to integrate it in any storage system so I created this library in which every IMAP command can be easily overwritten.

Installation

npm install joltra-imap-server

Usage

var ImapServer = require('joltra-imap-server');
ImapServer.IMAPServer();

Command override example

//login function override
function ImapLogin(command, socket){
  if(command.args[0] == "user" && command.args[1]=="pass"){
    socket.write(command.tag + " OK Welcome overwritten " + command.args[0] + "\r\n");
    socket.IMAPState = ImapServer.IMAPState.Authenticated;
  }else{
    socket.write(command.tag + " NO Wrong user or password.\r\n");
  }
}
ImapServer.IMAPCommands.LOGIN.callback = ImapLogin;

Notes

  • Default port : 143
0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

11 years ago

0.0.1

11 years ago