haraka-plugin-batv-etcd-config
v1.2.0
Published
Haraka plugin for Bounce Address Tag Validation, which uses etcd to store its config.
Downloads
5
Maintainers
Readme
haraka-plugin-batv-etcd-config
This Bounce Address Tag Validation plugin uses "etcd" to access to its config variables, different from the original batv plugin: https://github.com/PartyPancakess/haraka-plugin-batv
Also, it uses a changed version of srs.js script: https://www.npmjs.com/package/srs.js
& IMPORTANT: this plugin must appear in config/plugins
before other plugins that run on hook_rcpt
How it works
Assume that the user uses the address [email protected] and will send an e-mail.
Before the e-mail is sent, [email protected] will automatically change to: [email protected]
If the e-mail bounces, after checking if the key is correct or not or whether there is a key at all, it will be forwarded to [email protected].
Configuration
The running etcd server must have 2 variables exclusively for this plugin: config_batv_secret and config_batv_maxAge. The value of "config_batv_secret" must be a string, which is the secret key of the srs. The value of "config_batv_maxAge" must contain a string ("day" or "second"), which determines the type of the maximum age, and an integer, separated by a hyphen. Below can be found example cases:
config_batv_secret: "asecretkey"
config_batv_maxAge: "day-21"
or
config_batv_secret: "asecretkey"
config_batv_maxAge: "second-1814400"
Example etcd Configuration
etcdctl put config_batv_maxAge day-7
etcdctl put config_batv_secret secretkey