24 août 2019 02:59 "Edgar Pettijohn" <[email protected]> a écrit:
> I am writing a table-lua, however the table_lua_update function doesn't > appear to be called. > Here are relevant pieces of the code. > > The lookup function works. However, it would be more ideal to have the > update() called early > to fill in the tables for the other functions. As is the lookup() has to do > the work of both. > > Any help is appreciated. > update is called when you issue an `smtpctl table update <tablename>` command. On a side note, I had this discussion with someone a few days ago but can't remember who, so if it was you and you already know, disregard: I have a plan for the next two releases to switch the implementation of tables to an API similar to that of filters, so we can have tables become scripts that read lines from stdin, write answers to stdout, be written in any language, etc.. Not discouraging you from writing something using the current API, it is not so much work anyways, but just letting you know that in a relatively short term your code is going to need a rewrite.
