srs.js

0.1.0 • Public • Published

srs.js v0.1.0

npm install srs.js

Javascript implementation of Sender Rewriting Scheme. Loosely based on the libsrs2 implementation, though compatibility with libsrs2/Mail::SRS is not guaranteed.

Usage

var SRS = require("srs.js");
var rewriter = new SRS({
    secret: "asecretkey"
});

// Rewrite the email orig@example.org
var rewritten = rewriter.forward("orig", "example.org");
// -> rewritten: SRS0=HHH=TT=example.org=orig
// Note that rewritten address does not include domain part (@example.org)

var reversed = rewriter.reverse(rewritten);
// -> reversed: ["orig", "example.org"]

License

Apache 2.0

Readme

Keywords

Package Sidebar

Install

npm i srs.js

Weekly Downloads

291

Version

0.1.0

License

Apache 2.0

Last publish

Collaborators

  • samcday