[Rspamd-Users] Announcement: avast.lua virus scanner module for Rspamd
Vsevolod Stakhov
vsevolod at rspamd.com
Thu Jan 30 17:15:58 UTC 2020
Hello,
On 30/01/2020 15:52, Ralph Seichter wrote:
> Hello list,
>
> I have written a Lua module allowing Rspamd 2.2 to access the Avast [1]
> virus scanner, and the sponsor sys4 AG [2] has agreed to let me offer
> this as an upstream contribution for Rspamd. The code is available at
>
> https://github.com/rseichter/rspamd-avast
>
> and I'd be happy if more people took "avast.lua" for a spin.
>
> -Ralph
>
> [1] https://www.avast.com/
> [2] https://sys4.de/
>
Thank you for your contribution! Unfortunately, I'm sorry to say but I
cannot accept it into Rspamd nor advice other users to try it.
The main issue is that lua-socket usage is a big *NO WAY* in Rspamd (in
fact, I would say that using *ANY* Lua or C module that is not a part of
Rspamd is usually a mistake).
You literally break almost everything with unpredictable consequences by
doing it as you mix non-blocking and blocking sockets IO. Why lua_tcp
was not enough for your purposes?
This module should also not be a dedicated plugin but a component of
lua_scanners framework. This framweork is also pluggable so the existing
`antivirus` plugin would automatically use a new scanner tye if it is
registered appropriately.
I would strongly advice to take a look at the existing modules, such as
fprot module [1].
Please also bear in mind the `lua_util` framework: it has lot's of
helper functions you have written one more time in your plugin.
[1]
https://github.com/rspamd/rspamd/blob/master/lualib/lua_scanners/fprot.lua
More information about the Users
mailing list