0.1.0 • Published 10 years ago

srs.js v0.1.0

Weekly downloads
88
License
Apache 2.0
Repository
github
Last release
10 years ago

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