Hellow,

I have been working on a new table backend: table-procexec.

What it does is translate the imsg table API to a line-based protocol that is
very similar to what we did for filters. A table backend can become a program
consuming table requests from stdin and responding to stdout:

stdin : 
table|0.1|1590532670.0123456|check|1234567890ABCDEF|mailaddr|gil...@poolp.org
stdout: table|1234567890ABCDEF|found


The idea behind this is to unlock table backend development to people who are
not necessarily C developers and who could still write useful implementations
in other languages. Like with filters, this makes it possible to use anything
from awk to shell, Go, Python and what not without OpenSMTPD caring about how
these backends are implemented.

I have written a Golang package to abstract the protocol details and that let
you write a backend by implementing the four basic operations of table API. A
sample table-example.go is available here to see how a backend looks like:

    https://gist.github.com/poolpOrg/b3b97a65791a11a49f5e76ea51331ae4


If people are willing to help implement some backends, hit me up

Cheers,
Gilles

Reply via email to