This is a major release, featuring:
Rule Engine
- Services
- Databases. (csv format)
- Commands. (via shell)
// -- services.vsl
service clamscan shell = #{
timeout: "10s",
command: "clamscan",
args: ["--infected", "--remove", "--recursive", "/home/jdoe"],
};
service greylist db:csv = #{
connector: "/db/user_accounts.csv",
access: "O_RDONLY",
refresh: "always",
delimiter: ",",
};
// -- main.vsl
import "services" as s;
// execute clamscan with a 10 second timeout
s::clamscan.shell_run();
// query & update a csv database.
s::greylist.get("john");
s::greylist.set(["new", "user", "new.user@example.com"]);
s::greylist.rm("green");
- A rework of the syntax to be as easy to use as possible. (everything as functions)
- Custom codes to send back to clients.
object code554_7_1 code = #{
base: 554,
enhanced: "5.7.1",
text: "Relay access denied"
};
deny(code554_7_1)
- Authentification pipeline access in vsl via the
authenticate
stage.
// -- main.vsl
#{
authenticate: [
rule "manage auth" || {
switch ctx().auth.type {
"Verify" => {
// check database for client password ...
accept()
},
"Query" => {
// send a custom code to the client.
info(db[ctx().auth.authid])
}
}
}
]
}