[Rspamd-Users] avast.lua virus scanner module for Rspamd

Vsevolod Stakhov vsevolod at rspamd.com
Thu Jan 30 20:32:07 UTC 2020


On 30/01/2020 19:02, Ralph Seichter wrote:
> * Vsevolod Stakhov:
> 
>> You literally break almost everything with unpredictable consequences
>> by doing it as you mix non-blocking and blocking sockets IO.
> 
> Strong words, with which I disagree, given that avast.lua does what it
> is meant to do on various servers (as tested by me and others).

Even if some architectural solution works for some users in some
conditions doesn't necessarily make it right. And this one is apparently
NOT right. I'm sorry but I don't have enough time to explain it in more
details. So you could either check the code or relevant textbooks (e.g
about so called c10k problem), or just trust my opinion on that.

> 
>> Why lua_tcp was not enough for your purposes?
> 
> I did not choose lua-socket lightly. As I wrote in my README, Avast only
> supports UNIX Domain Sockets at this time, and from what I could tell,
> rspamd_tcp only deals with network sockets. Lua and Domain Sockets don't
> seem to be a frequently used combination, so I found my choices limited.

> Did I miss an existing Rspamd module supporting domain sockets?

Yes, lua_tcp works with unix sockets exactly the same as with the inet
ones. You can take a look at DCC module that uses a Unix socket by default.


>> I would strongly advice to take a look at the existing modules, such
>> as fprot module
> 
> Sigh. Obviously I had a look at other scanner modules before I started
> writing code.

I think you might get some benefits from reiterating on this step: AV
modules have very clear structure and I'd appreciate if new modules
follows the same patterns as the existing ones.


More information about the Users mailing list